Skip to content

Commit 60eaaec

Browse files
authored
[#665] [도서 검색] 최근 검색어 존재하지 않을때 UI 수정 #666
* fix: 로그인한 유저 최근 검색어가 없을 때 "검색 기록이 없어요!" 문구 보이게 수정 (#666)
1 parent bbabb1d commit 60eaaec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/bookSearch/RecentSearchList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ type RecentSearchListProps = {
99
};
1010

1111
const RecentSearchList = ({ keywords, onClick }: RecentSearchListProps) => {
12+
const hasKeywords = keywords && keywords?.length !== 0;
13+
1214
return (
1315
<section className="flex flex-col gap-[1.5rem]">
1416
<h2 className="font-body1-regular">최근 검색어</h2>
15-
{keywords ? (
17+
{hasKeywords ? (
1618
<ul className="relative flex w-[calc(100%+2rem)] gap-[1rem] overflow-x-scroll whitespace-nowrap pb-[1rem]">
1719
{keywords.map(item => (
1820
<li key={`${item.keyword}-${item.modifiedAt}`}>

0 commit comments

Comments
 (0)