-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(dashboard): bust order preview cache to reset fulfilled quantity #8687
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
@@ -35,7 +35,7 @@ export const useCancelFulfillment = ( | |||
onSuccess: (data: any, variables: any, context: any) => { | |||
queryClient.invalidateQueries({ queryKey: fulfillmentsQueryKeys.lists() }) | |||
queryClient.invalidateQueries({ | |||
queryKey: ordersQueryKeys.details(), | |||
queryKey: ordersQueryKeys.all, |
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.
There is no need to invalidate everything on orders
if we just want to refresh preview.
You can pass orderId
as a param in the hook and call ordersQueryKeys.preview(id)
.
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.
good push, I'll do this for all the other ones i've done so far as well.
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.
@fPolic just changed. Invalidating just the .detail(id)
isn't invalidating it correctly though.
d50ec90
to
684fe66
Compare
what:
RESOLVES CC-325