diff --git a/src/components/Search.tsx b/src/components/Search.tsx index 4b7d164..3f05ae2 100644 --- a/src/components/Search.tsx +++ b/src/components/Search.tsx @@ -36,7 +36,8 @@ export default function SearchBar({ searchList }: Props) { const fuse = new Fuse(searchList, { keys: ["title", "description"], includeMatches: true, - threshold: 0.3, + minMatchCharLength: 2, + threshold: 0.5, }); useEffect(() => { @@ -66,7 +67,7 @@ export default function SearchBar({ searchList }: Props) { /> - {searchResults && searchResults.length > 0 && ( + {inputVal.length > 1 && (