mirror of
https://github.com/Xevion/icons.git
synced 2025-12-09 20:07:26 -06:00
Attempt to mitigate loading all packs on load
- resolve type warnings - remove unused RegEx
This commit is contained in:
@@ -23,7 +23,7 @@ const Home: NextPage = () => {
|
||||
|
||||
const filtered = useMemo(() => {
|
||||
const start = new Date();
|
||||
const results = icons.filter(({id}) => id.toLowerCase().indexOf(query) !== -1);
|
||||
const results = debouncedQuery.length == 0 ? [] : icons.filter(({id}) => id.toLowerCase().indexOf(query) !== -1);
|
||||
const end = new Date();
|
||||
|
||||
// const results = fuse.search(query, {limit: maximumResults});
|
||||
@@ -33,7 +33,7 @@ const Home: NextPage = () => {
|
||||
}, [debouncedQuery]);
|
||||
|
||||
const catalog = useMemo(() => {
|
||||
return <IconCatalog icons={debouncedQuery.length === 0 ? [] : filtered.map(i => i).slice(0, 100)}/>;
|
||||
return <IconCatalog icons={filtered.map(i => i).slice(0, 100)}/>;
|
||||
}, [filtered]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user