Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfd7601

Browse files
committed
Refetch get-current-goal query after setting the goal
1 parent 8a4c09e commit cfd7601

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/goals/NewGoal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default function NewGoal() {
4444
'/api/fauna/goals/all-goals-by-user',
4545
(session.user as User).id,
4646
])
47+
queryClient.refetchQueries('/api/fauna/goals/get-current-goal')
4748
},
4849
onError: () => {
4950
toast.error('Something went wrong!!!', { id: toastId.current })

0 commit comments

Comments
 (0)