A social knowledge tool for researchers built on ATProto

fix: collection query key on collection creation

+1 -1
+1 -1
src/webapp/features/collections/lib/mutations/useCreateCollection.tsx
··· 14 // Do UI related things like redirects or showing toast notifications in mutate callbacks. If the user navigated away from the current screen before the mutation finished, those will purposefully not fire 15 // https://tkdodo.eu/blog/mastering-mutations-in-react-query#some-callbacks-might-not-fire 16 onSuccess: () => { 17 - queryClient.invalidateQueries({ queryKey: collectionKeys.infinite() }); 18 queryClient.refetchQueries({ queryKey: collectionKeys.mine() }); 19 }, 20 });
··· 14 // Do UI related things like redirects or showing toast notifications in mutate callbacks. If the user navigated away from the current screen before the mutation finished, those will purposefully not fire 15 // https://tkdodo.eu/blog/mastering-mutations-in-react-query#some-callbacks-might-not-fire 16 onSuccess: () => { 17 + queryClient.invalidateQueries({ queryKey: collectionKeys.all() }); 18 queryClient.refetchQueries({ queryKey: collectionKeys.mine() }); 19 }, 20 });