File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/library-authoring/data Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ export const libraryAuthoringQueryKeys = {
62
62
'content' ,
63
63
'libraryBlockTypes' ,
64
64
] ,
65
- collection : ( collectionId ?: string ) => [ ...libraryAuthoringQueryKeys . all , collectionId ] ,
65
+ collection : ( libraryId ?: string , collectionId ?: string ) => [
66
+ ...libraryAuthoringQueryKeys . all ,
67
+ libraryId ,
68
+ collectionId ,
69
+ ] ,
66
70
} ;
67
71
68
72
export const xblockQueryKeys = {
@@ -278,7 +282,7 @@ export const useXBlockOLX = (usageKey: string) => (
278
282
*/
279
283
export const useCollection = ( libraryId : string | undefined , collectionId : string | undefined ) => (
280
284
useQuery ( {
281
- queryKey : libraryAuthoringQueryKeys . contentLibrary ( collectionId ) ,
285
+ queryKey : libraryAuthoringQueryKeys . collection ( libraryId , collectionId ) ,
282
286
queryFn : ( ) => getCollection ( libraryId ! , collectionId ! ) ,
283
287
enabled : collectionId !== undefined && libraryId !== undefined ,
284
288
} )
You can’t perform that action at this time.
0 commit comments