mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
refactor: remove redundant document deletion logic and optimize cache updates
This commit is contained in:
parent
878e829bdc
commit
ab2896ec65
4 changed files with 9 additions and 64 deletions
|
|
@ -95,7 +95,7 @@ export const deleteDocumentMutationAtom = atomWithMutation((get) => {
|
|||
},
|
||||
|
||||
onSuccess: (_, request: DeleteDocumentRequest) => {
|
||||
toast.success("Document deleted successfully");
|
||||
// Note: Toast is handled by the caller (page.tsx onBulkDelete) to show count info
|
||||
queryClient.setQueryData(
|
||||
cacheKeys.documents.globalQueryParams(documentsQueryParams),
|
||||
(oldData: GetDocumentsResponse | undefined) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue