File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/frontend/apps/impress/src/features/docs Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import * as Y from 'yjs';
7
7
8
8
import { APIError , errorCauses , fetchAPI } from '@/api' ;
9
9
import { toBase64 } from '@/docs/doc-editor' ;
10
+ import { KEY_DOC_TREE } from '@/docs/doc-tree' ;
10
11
import { KEY_LIST_DOC_VERSIONS } from '@/docs/doc-versioning' ;
11
12
12
13
import { useProviderStore } from '../stores' ;
@@ -85,6 +86,9 @@ export function useDuplicateDoc(options: DuplicateDocOptions) {
85
86
void queryClient . resetQueries ( {
86
87
queryKey : [ KEY_LIST_DOC ] ,
87
88
} ) ;
89
+ void queryClient . resetQueries ( {
90
+ queryKey : [ KEY_DOC_TREE ] ,
91
+ } ) ;
88
92
void options . onSuccess ?.( data , variables , context ) ;
89
93
} ,
90
94
} ) ;
Original file line number Diff line number Diff line change 1
1
export * from './useCreateChildren' ;
2
2
export * from './useDocChildren' ;
3
+ export * from './useDocTree' ;
3
4
export * from './useMove' ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const getDocTree = async ({ docId }: DocsTreeParams): Promise<Doc> => {
25
25
return response . json ( ) as Promise < Doc > ;
26
26
} ;
27
27
28
- export const KEY_LIST_DOC_CHILDREN = 'doc-tree' ;
28
+ export const KEY_DOC_TREE = 'doc-tree' ;
29
29
30
30
export function useDocTree (
31
31
params : DocsTreeParams ,
@@ -35,7 +35,7 @@ export function useDocTree(
35
35
> ,
36
36
) {
37
37
return useQuery < Doc , APIError , Doc > ( {
38
- queryKey : [ KEY_LIST_DOC_CHILDREN , params ] ,
38
+ queryKey : [ KEY_DOC_TREE , params ] ,
39
39
queryFn : ( ) => getDocTree ( params ) ,
40
40
staleTime : 0 ,
41
41
refetchOnWindowFocus : false ,
You can’t perform that action at this time.
0 commit comments