-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
tests failing due to #679 |
apps/daimo-web/src/middleware.ts
Outdated
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
apps/daimo-web/src/middleware.ts
Outdated
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; |
There was a problem hiding this comment.
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?
fixes #666