-
Notifications
You must be signed in to change notification settings - Fork 262
feat: add notice about registering with same email as sub #4491
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -109,6 +109,13 @@ export const usePaddlePayment = ({ | |||
}), | |||
}); | |||
|
|||
if (router.pathname.includes('/helloworld')) { | |||
localStorage.setItem( | |||
'funnelSubscribed', |
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.
Let's store this string in a const to make it easier to be consistent across files 🙏
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 one thing about the magic string, other than that, the Alert looks amazing 🤩
@@ -160,6 +161,8 @@ function InnerFunnelRegistration({ | |||
keepSession: true, | |||
}); | |||
|
|||
const didSubscribe = localStorage?.getItem('funnelSubscribed'); |
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.
Check if local storage is supported
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.
we can also maybe add a fallback with query param, I know some instagram/facebook browsers sometimes disable local storage
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.
@capJavert This was a good point. I think it's a bit redundant to use both, though, if queryparams is available in all cases (which I think it is), so I reverted from localStorage to queryparams entirely.
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.
Yeah query params can be a good choice since URL can't normally be changed on in-app browsers.
ae25820
into
MI-881-sub-before-registration
Changes
Adds an alert to inform the user to use the same email for the registration as they did while subscribing.
I chose to use localStorage for this for two reasons.
(don't mind the bg image size, I just pasted in the desktop one cause its required in the editor 😂)
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Jira ticket
MI-899
Preview domain
https://mi-899.preview.app.daily.dev