diff --git a/src/library-authoring/LibraryAuthoringPage.tsx b/src/library-authoring/LibraryAuthoringPage.tsx index 343bb94f6..15d20bf25 100644 --- a/src/library-authoring/LibraryAuthoringPage.tsx +++ b/src/library-authoring/LibraryAuthoringPage.tsx @@ -205,7 +205,7 @@ const LibraryAuthoringPage = () => { /> } + element={} /> handleTabChange(tabList.components)} > - + ) diff --git a/src/library-authoring/LibraryRecentlyModified.tsx b/src/library-authoring/LibraryRecentlyModified.tsx index 57828871e..4ec5e0b9f 100644 --- a/src/library-authoring/LibraryRecentlyModified.tsx +++ b/src/library-authoring/LibraryRecentlyModified.tsx @@ -8,10 +8,9 @@ import { type CollectionHit, type ContentHit, SearchSortOption } from '../search import LibrarySection, { LIBRARY_SECTION_PREVIEW_LIMIT } from './components/LibrarySection'; import messages from './messages'; import ComponentCard from './components/ComponentCard'; -import { useLibraryBlockTypes } from './data/apiHooks'; import CollectionCard from './components/CollectionCard'; -const RecentlyModified: React.FC<{ libraryId: string }> = ({ libraryId }) => { +const RecentlyModified = () => { const intl = useIntl(); const { hits, @@ -31,17 +30,6 @@ const RecentlyModified: React.FC<{ libraryId: string }> = ({ libraryId }) => { ...collectionList, ], ['modified'], ['desc']).slice(0, LIBRARY_SECTION_PREVIEW_LIMIT); - const { data: blockTypesData } = useLibraryBlockTypes(libraryId); - const blockTypes = useMemo(() => { - const result = {}; - if (blockTypesData) { - blockTypesData.forEach(blockType => { - result[blockType.blockType] = blockType; - }); - } - return result; - }, [blockTypesData]); - return componentCount > 0 ? ( = ({ libraryId }) extraFilter={`context_key = "${libraryId}"`} overrideSearchSortOrder={SearchSortOption.RECENTLY_MODIFIED} > - + ); diff --git a/src/library-authoring/collections/LibraryCollectionComponents.tsx b/src/library-authoring/collections/LibraryCollectionComponents.tsx index 5d870645c..f9092722a 100644 --- a/src/library-authoring/collections/LibraryCollectionComponents.tsx +++ b/src/library-authoring/collections/LibraryCollectionComponents.tsx @@ -6,7 +6,7 @@ import { LibraryComponents } from '../components'; import messages from './messages'; import { LibraryContext } from '../common/context'; -const LibraryCollectionComponents = ({ libraryId }: { libraryId: string }) => { +const LibraryCollectionComponents = () => { const { totalHits: componentCount, isFiltered } = useSearchContext(); const { openAddContentSidebar } = useContext(LibraryContext); @@ -25,7 +25,7 @@ const LibraryCollectionComponents = ({ libraryId }: { libraryId: string }) => { return (

Content ({componentCount})

- +
); }; diff --git a/src/library-authoring/collections/LibraryCollectionPage.tsx b/src/library-authoring/collections/LibraryCollectionPage.tsx index b2344a9b1..e52644196 100644 --- a/src/library-authoring/collections/LibraryCollectionPage.tsx +++ b/src/library-authoring/collections/LibraryCollectionPage.tsx @@ -169,7 +169,7 @@ const LibraryCollectionPageInner = ({ libraryId }: { libraryId: string }) => {
- + diff --git a/src/library-authoring/components/LibraryComponents.test.tsx b/src/library-authoring/components/LibraryComponents.test.tsx index ed490b92d..56b07dc95 100644 --- a/src/library-authoring/components/LibraryComponents.test.tsx +++ b/src/library-authoring/components/LibraryComponents.test.tsx @@ -95,7 +95,7 @@ const RootWrapper = (props) => ( - + diff --git a/src/library-authoring/components/LibraryComponents.tsx b/src/library-authoring/components/LibraryComponents.tsx index c91dbad55..6e332b426 100644 --- a/src/library-authoring/components/LibraryComponents.tsx +++ b/src/library-authoring/components/LibraryComponents.tsx @@ -9,7 +9,6 @@ import { LIBRARY_SECTION_PREVIEW_LIMIT } from './LibrarySection'; import { LibraryContext } from '../common/context'; type LibraryComponentsProps = { - libraryId: string, variant: 'full' | 'preview', }; @@ -20,7 +19,7 @@ type LibraryComponentsProps = { * - 'full': Show all components with Infinite scroll pagination. * - 'preview': Show first 4 components without pagination. */ -const LibraryComponents = ({ libraryId, variant }: LibraryComponentsProps) => { +const LibraryComponents = ({ variant }: LibraryComponentsProps) => { const { hits, totalHits: componentCount,