Skip to content

Commit

Permalink
fix: should be 0 results not result
Browse files Browse the repository at this point in the history
  • Loading branch information
nexxeln committed Nov 30, 2022
1 parent d1450ac commit eceb289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ export default function SearchBar({ searchList }: Props) {
{inputVal.length > 1 && (
<div className="mt-8">
Found {searchResults?.length}
{searchResults?.length && searchResults?.length > 1
? " results"
: " result"}{" "}
{searchResults?.length && searchResults?.length === 1
? " result"
: " results"}{" "}
for '{inputVal}'
</div>
)}
Expand Down

0 comments on commit eceb289

Please sign in to comment.