From dabeaa8920314f0fdb3f1e8f066e7bfa56256219 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Mon, 30 Sep 2024 12:04:44 +0530 Subject: [PATCH] refactor: rebase upstream --- .../components/CollectionCard.tsx | 17 +++++++++++++---- src/search-manager/data/api.ts | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/library-authoring/components/CollectionCard.tsx b/src/library-authoring/components/CollectionCard.tsx index 251c5453da..96df40c609 100644 --- a/src/library-authoring/components/CollectionCard.tsx +++ b/src/library-authoring/components/CollectionCard.tsx @@ -8,7 +8,6 @@ import { useToggle, } from '@openedx/paragon'; import { MoreVert } from '@openedx/paragon/icons'; -import { useContext } from 'react'; import { Link } from 'react-router-dom'; import { type CollectionHit } from '../../search-manager'; @@ -19,11 +18,11 @@ import { useDeleteCollection, useRestoreCollection } from '../data/apiHooks'; import DeleteModal from '../../generic/delete-modal/DeleteModal'; import messages from './messages'; -type CollectionCardProps = { +type CollectionMenuProps = { collectionHit: CollectionHit, }; -const CollectionMenu = ({ collectionHit } : CollectionCardProps) => { +const CollectionMenu = ({ collectionHit } : CollectionMenuProps) => { const intl = useIntl(); const { showToast } = useContext(ToastContext); const [isDeleteModalOpen, openDeleteModal, closeDeleteModal] = useToggle(false); @@ -68,10 +67,16 @@ const CollectionMenu = ({ collectionHit } : CollectionCardProps) => { src={MoreVert} iconAs={Icon} variant="primary" - alt={intl.formatMessage(messages.componentCardMenuAlt)} + alt={intl.formatMessage(messages.collectionCardMenuAlt)} data-testid="collection-card-menu-toggle" /> + + + @@ -92,6 +97,10 @@ const CollectionMenu = ({ collectionHit } : CollectionCardProps) => { ); }; +type CollectionCardProps = { + collectionHit: CollectionHit, +}; + const CollectionCard = ({ collectionHit } : CollectionCardProps) => { const intl = useIntl(); const { diff --git a/src/search-manager/data/api.ts b/src/search-manager/data/api.ts index 062952be61..5feeb2456a 100644 --- a/src/search-manager/data/api.ts +++ b/src/search-manager/data/api.ts @@ -103,7 +103,6 @@ interface BaseContentHit { displayName: string; usageKey: string; blockId: string; - usageKey: string; /** The course or library ID */ contextKey: string; org: string;