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

fix: gifting while user is a Plus member already #4131

Merged
merged 7 commits into from
Jan 30, 2025

Conversation

sshanzel
Copy link
Member

@sshanzel sshanzel commented Jan 30, 2025

Changes

  • Fix to display that checkout is available when user is a Plus member and wants to gift a user.
  • Updated the right id for the gifting price id.

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

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Jan 30, 2025 4:53pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Jan 30, 2025 4:53pm

@sshanzel sshanzel changed the title Fix availability fix: gifting while user is a Plus member already Jan 30, 2025
@@ -124,38 +124,6 @@ export const PaymentContextProvider = ({
});
}, [router]);

const openCheckout = useCallback(
Copy link
Member Author

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,
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines 34 to 46
if (giftToUser) {
if (!giftOneYear) {
return;
}

if (!selectedOption) {
const { value } = giftOneYear;
setSelectedOption(value);
openCheckout({ priceId: value });
}

return;
}
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@ilasw ilasw left a 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 👏

@sshanzel sshanzel merged commit 5130a56 into MI-746-gifting-plus Jan 30, 2025
10 checks passed
@sshanzel sshanzel deleted the fix-availability branch January 30, 2025 16:54
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.

2 participants