+ {recentSearches.map((keyword) => (
+
onUpdateKeyword(keyword)}
+ className="flex cursor-pointer items-center justify-between py-[10px]"
+ >
+ {keyword}
+
diff --git a/src/features/search/components/search-item/index.tsx b/src/features/search/components/search-item/index.tsx
index bf7e6594..1db9a393 100644
--- a/src/features/search/components/search-item/index.tsx
+++ b/src/features/search/components/search-item/index.tsx
@@ -3,17 +3,20 @@ import Tag from '@/shared/components/ui/tag'
import Text from '@/shared/components/ui/text'
import { cn } from '@/shared/lib/utils'
import DocumentTypeIcon from '@/features/document/components/document-type-icon'
+import Link from 'next/link'
interface Props {
+ documentId: number | undefined // api 수정되면 undefined 제거
createType: Document.ItemInList['documentType']
- documentTitle: string
- matchingSentence: string
+ documentTitle: React.ReactNode
+ matchingSentence: React.ReactNode
resultType: 'document' | 'quiz'
relativeDirectory: string
lastItem?: boolean
}
const SearchItem = ({
+ documentId,
createType,
documentTitle,
matchingSentence,
@@ -22,7 +25,8 @@ const SearchItem = ({
lastItem,
}: Props) => {
return (
-
{documentTitle}
- {/* todo: 키워드와 일치하는 부분 색상 accent표시 하는 로직 필요 */}
{matchingSentence}
@@ -50,7 +53,7 @@ const SearchItem = ({
{relativeDirectory}
-