You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#86
## Description
Applying optimistic update when marking question as done (following this pattern: https://tanstack.com/query/v4/docs/react/guides/optimistic-updates)
## Current Tasks
- [x] Move mark as done mutation to its own custom hook `useMarkQuestionAsDone`
- [x] Close dialog `onMutate` after performing optimistic update
- [x] Remove success `toast` and loading state on button since it is now not necessary as we're applying optimistic update
- [x] Remove `refetch` and `onRefetch` props in favor of `queryClient.invalidateQueries`
- [x] Use `dialog` manager and apply same confirm dialog design as #87 for styling consistency
Is your feature request related to a problem? Please describe.
Now we need to refetch all data when doing an update on Tandai Sudah Dijawab. Prefer using optimistic update
Describe the solution you'd like
https://tanstack.com/query/v4/docs/react/guides/optimistic-updates
The text was updated successfully, but these errors were encountered: