Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: redirect /l/download to App Store #681

Merged
merged 1 commit into from
Feb 10, 2024
Merged

web: redirect /l/download to App Store #681

merged 1 commit into from
Feb 10, 2024

Conversation

dcposch
Copy link
Member

@dcposch dcposch commented Feb 6, 2024

fixes #666

@dcposch
Copy link
Member Author

dcposch commented Feb 6, 2024

tests failing due to #679

const urlAppStore = "https://apps.apple.com/us/app/daimo/id6459700343";
const urlPlay = "https://play.google.com/store/apps/details?id=com.daimo";
if (ua.includes("Android")) return urlPlay;
else if (ua.includes("iPhone")) return urlAppStore;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we have some utils for this same heuristic in https://github.com/daimo-eth/daimo/blob/master/apps/daimo-web/src/utils/platform.ts, want to dedupe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, done

Copy link
Member

@nalinbhardwaj nalinbhardwaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

const urlAppStore = "https://apps.apple.com/us/app/daimo/id6459700343";
const urlPlay = "https://play.google.com/store/apps/details?id=com.daimo";
const platform = detectPlatform(ua);
if (platform === "ios") return urlAppStore;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just import and return downloadMetadata[platform].url should work no?

@dcposch dcposch merged commit a7fbd79 into master Feb 10, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

https://daimo.com/l/download
2 participants