Skip to content

Commit

Permalink
fix: 검색결과값이 없을 경우 메시지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
cbcruk committed Aug 5, 2024
1 parent 4af807d commit a253ee1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Search/SearchFormResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ function SearchFormResult({ q }) {
const fuse = useFuse()
const result = fuse.search(q)

if (q && result.length === 0) {
return <p className="text-xs font-bold">🤔 검색결과값이 없습니다.</p>
}

return (
<MemoLayout>
{result.map((memo) => {
Expand Down

0 comments on commit a253ee1

Please sign in to comment.