mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 05:02:06 +10:00
fix: invalidate trashed page from tree state
This commit is contained in:
@ -126,8 +126,9 @@ export function useUpdatePageMutation() {
|
||||
export function useRemovePageMutation() {
|
||||
return useMutation({
|
||||
mutationFn: (pageId: string) => deletePage(pageId, false),
|
||||
onSuccess: () => {
|
||||
onSuccess: (_, pageId) => {
|
||||
notifications.show({ message: "Page moved to trash" });
|
||||
invalidateOnDeletePage(pageId);
|
||||
queryClient.invalidateQueries({
|
||||
predicate: (item) =>
|
||||
["trash-list"].includes(item.queryKey[0] as string),
|
||||
|
||||
Reference in New Issue
Block a user