We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbabb1d commit 60eaaecCopy full SHA for 60eaaec
src/components/bookSearch/RecentSearchList.tsx
@@ -9,10 +9,12 @@ type RecentSearchListProps = {
9
};
10
11
const RecentSearchList = ({ keywords, onClick }: RecentSearchListProps) => {
12
+ const hasKeywords = keywords && keywords?.length !== 0;
13
+
14
return (
15
<section className="flex flex-col gap-[1.5rem]">
16
<h2 className="font-body1-regular">최근 검색어</h2>
- {keywords ? (
17
+ {hasKeywords ? (
18
<ul className="relative flex w-[calc(100%+2rem)] gap-[1rem] overflow-x-scroll whitespace-nowrap pb-[1rem]">
19
{keywords.map(item => (
20
<li key={`${item.keyword}-${item.modifiedAt}`}>
0 commit comments