-
Notifications
You must be signed in to change notification settings - Fork 244
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: plus gifter query error makes page slow #4179
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -31,6 +31,7 @@ export const PlusPlus = ({ className }: PlusPlusProps): ReactElement => { | |||
queryFn: getPlusGifterUser, | |||
enabled: Boolean(user?.isPlus), | |||
staleTime: StaleTime.Default, | |||
retry: false, |
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 don't think we should disable retry but handle the error inside getPlusGifterUser
, for example if ForbiddenError('User is not a gifted plus user')
we catch it and return false from getPlusGifterUser
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.
you can check how to catch API error in useSourceIntegrationQuery
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.
Nice! Added retry again and moved with this solution ✔️
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-plus-checkout-loading.preview.app.daily.dev