Skip to content

Commit

Permalink
BUGFIX: Update asset count in collections on delete and adding assets
Browse files Browse the repository at this point in the history
Resolves: #202
  • Loading branch information
Sebobo committed Sep 15, 2023
1 parent 082ca17 commit d6dc37d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function useUploadFile() {
tagId,
assetCollectionId,
},
refetchQueries: ['ASSET_COLLECTIONS'],
});

return { uploadFile, uploadState: data?.uploadFile || {}, error, loading };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function useUploadFiles() {
tagId,
assetCollectionId,
},
refetchQueries: ['ASSET_COLLECTIONS'],
});

return { uploadFiles, uploadState: data?.uploadFiles || [], error, loading };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function useDeleteAsset() {
query: ASSET,
variables: { id: assetId, assetSourceId: assetSourceId },
},
'ASSET_COLLECTIONS',
],
update: (cache, { data: { deleteAsset: success } }) => {
if (!success) return;
Expand Down

0 comments on commit d6dc37d

Please sign in to comment.