-
Notifications
You must be signed in to change notification settings - Fork 260
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
feat(funnels): checkout step #4355
Conversation
Introduce a checkout step which shows paddle checkout in fullscreen and transitions to next step on checkout. Simple as it sounds, it required some changes to how we use paddle. For the storybook support I had to use history instead of router, since storybook doesn't have a router. MI-843 #done
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -7,7 +7,7 @@ export const useRouterQuery = (): { | |||
const params = useSearchParams(); | |||
return useMemo( | |||
() => ({ | |||
query: Object.fromEntries(params.entries()), | |||
query: params ? Object.fromEntries(params.entries()) : {}, |
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.
This also broke storybook
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, useSearchParams
can return null
@@ -0,0 +1,138 @@ | |||
import { useState, useEffect, useRef } from 'react'; |
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.
This hook has less constraints on how we use paddle and primarily initialize it with the right tracking and nothing more
}); | ||
|
||
useEffect(() => { | ||
if (!isPlusAvailable || isPlus || !paddle) { |
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.
If its not a valid region, how does the user continue the funnel from here? As far as I can see we don't render any continue button or anything? 🤔
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.
that's a good question. i'll raise with product
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 will safeguard this case and redirect to onboarding as part of the funnel page
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.
Nothing blocking, just a sanity check
Introduce a checkout step which shows paddle checkout in fullscreen and transitions to next step on checkout.
Simple as it sounds, it required some changes to how we use paddle. For the storybook support I had to use history instead of router, since storybook doesn't have a router.
MI-843 #done
Jira ticket
MI-843
Preview domain
https://mi-843.preview.app.daily.dev