-
Notifications
You must be signed in to change notification settings - Fork 245
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
fix: gifting while user is a Plus member already #4131
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -124,38 +124,6 @@ export const PaymentContextProvider = ({ | |||
}); | |||
}, [router]); | |||
|
|||
const openCheckout = useCallback( |
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 moved it down below.
@@ -34,7 +34,7 @@ const feature = { | |||
onboardingChecklist: new Feature('onboarding_checklist', true), | |||
showCodeSnippets: new Feature('show_code_snippets', false), | |||
pricingIds: new Feature('pricing_ids', { | |||
pri_01jjbwd5j7k0nm45k8e07yfmwr: PlusPriceType.Yearly, // TODO: this value is from test env and needs to be updated | |||
pri_01jjvm32ygwb1ja7w52e668fr2: PlusPriceType.Yearly, |
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.
ID from Nimrod.
if (giftToUser) { | ||
if (!giftOneYear) { | ||
return; | ||
} | ||
|
||
if (!selectedOption) { | ||
const { value } = giftOneYear; | ||
setSelectedOption(value); | ||
openCheckout({ priceId: value }); | ||
} | ||
|
||
return; | ||
} |
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.
Do we already have this logic in the mobile component?
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.
I checked the mobile component, seems to be not used. Maybe because we open checkout there after submit button.
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.
Look good code wise 👏
Changes
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
Preview domain
https://fix-availability.preview.app.daily.dev