Skip to content

Commit

Permalink
[#665] [도서 검색] 최근 검색어 존재하지 않을때 UI 수정 #666
Browse files Browse the repository at this point in the history
* fix: 로그인한 유저 최근 검색어가 없을 때 "검색 기록이 없어요!" 문구 보이게 수정 (#666)
  • Loading branch information
hanyugeon authored Jul 24, 2024
1 parent bbabb1d commit 60eaaec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/bookSearch/RecentSearchList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ type RecentSearchListProps = {
};

const RecentSearchList = ({ keywords, onClick }: RecentSearchListProps) => {
const hasKeywords = keywords && keywords?.length !== 0;

return (
<section className="flex flex-col gap-[1.5rem]">
<h2 className="font-body1-regular">최근 검색어</h2>
{keywords ? (
{hasKeywords ? (
<ul className="relative flex w-[calc(100%+2rem)] gap-[1rem] overflow-x-scroll whitespace-nowrap pb-[1rem]">
{keywords.map(item => (
<li key={`${item.keyword}-${item.modifiedAt}`}>
Expand Down

0 comments on commit 60eaaec

Please sign in to comment.