Skip to content

Commit

Permalink
fix: update collection after saving
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed May 27, 2024
1 parent 5f6e986 commit 4b218af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/hooks/collections/use-create-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const useCreateCollection = (params: Params) => {
mutationKey: ['createCollection'],
onSuccess: async (data) => {
await queryClient.invalidateQueries({
queryKey: ['collection', { reference: data.reference }],
queryKey: ['collection', data.reference],
exact: false,
});
enqueueSnackbar('Колекцію успішно створено', {
Expand Down
2 changes: 1 addition & 1 deletion services/hooks/collections/use-update-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const useUpdateCollection = (params: Params) => {
mutationKey: ['updateCollection'],
onSuccess: async (data) => {
await queryClient.invalidateQueries({
queryKey: ['collection', { reference: data.reference }],
queryKey: ['collection', data.reference],
exact: false,
});
enqueueSnackbar('Колекцію успішно оновлено', {
Expand Down

0 comments on commit 4b218af

Please sign in to comment.