From 6b4e7478676e46be900fa7b6e251cb5bf8104093 Mon Sep 17 00:00:00 2001 From: "nageuna922@gmail.com" Date: Wed, 11 Dec 2024 17:04:21 +0900 Subject: [PATCH] fix: route --- .../search/screen/all-search-results.tsx | 29 ++++++++++++++----- .../search/screen/search-in-document.tsx | 9 ++---- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/features/search/screen/all-search-results.tsx b/src/features/search/screen/all-search-results.tsx index ccd8f35e..81fb614c 100644 --- a/src/features/search/screen/all-search-results.tsx +++ b/src/features/search/screen/all-search-results.tsx @@ -2,6 +2,7 @@ import { Button } from '@/shared/components/ui/button' import CollectionSearchList from '../components/collection-search-list' import SearchList from '../components/search-list' import Icon from '@/shared/components/custom/icon' +import Link from 'next/link' interface Props { docsQuizLength: number @@ -29,10 +30,16 @@ const AllSearchResults = ({ /> {/* 퀴즈 노트 전체보기 버튼 : 클릭 시 tab = quiz-note로 변경 */} - + + + )} @@ -44,10 +51,16 @@ const AllSearchResults = ({ /> {/* 컬렉션 전체보기 버튼 : : 클릭 시 tab = collection으로 변경 */} - + + + )} diff --git a/src/features/search/screen/search-in-document.tsx b/src/features/search/screen/search-in-document.tsx index f72daf8b..0eaa6cf0 100644 --- a/src/features/search/screen/search-in-document.tsx +++ b/src/features/search/screen/search-in-document.tsx @@ -3,7 +3,6 @@ import { ChangeEvent, useEffect, useRef, useState } from 'react' import RecentSearches from '../components/recent-searches' import HeaderInDocument from '../components/header-in-document' -import Text from '@/shared/components/ui/text' import { useRouter, useSearchParams } from 'next/navigation' import { useQuery } from '@tanstack/react-query' import { queries } from '@/shared/lib/tanstack-query/query-keys' @@ -12,6 +11,7 @@ import { RECENT_SEARCHES } from '../config' import { getLocalStorage, setLocalStorage } from '@/shared/utils/storage' import usePreviousPath from '@/shared/hooks/use-previous-path' import SearchList from '../components/search-list' +import NoResults from './no-results' // 퀴즈노트 탭 내 검색창 화면 const SearchInDocument = () => { @@ -109,12 +109,7 @@ const SearchInDocument = () => { {!isSearchFocused && // 검색 결과 X (!data || searchResults.length === 0 ? ( -
- 검색결과가 없습니다 - - 다른 키워드를 입력해보세요 - -
+ ) : ( // 검색 결과 O : 검색 결과 리스트 data &&