diff --git a/src/pages/search.tsx b/src/pages/search.tsx index 4901f1e..683696f 100644 --- a/src/pages/search.tsx +++ b/src/pages/search.tsx @@ -43,8 +43,7 @@ import { useCuratedSet } from 'hooks/useCuratedSet' enum SearchKindEnum { Mods = 'Mods', Games = 'Games', - Users = 'Users', - Categories = 'Categories' + Users = 'Users' } export const SearchPage = () => { @@ -133,10 +132,6 @@ export const SearchPage = () => { {searchKind === SearchKindEnum.Games && ( )} - - {searchKind === SearchKindEnum.Categories && ( - - )} @@ -543,44 +538,3 @@ function dedup(event1: NDKEvent, event2: NDKEvent) { return event2 } - -interface CategoriesResultProps { - searchTerm: string -} - -const CategoriesResult = ({ searchTerm }: CategoriesResultProps) => { - const { ndk } = useNDKContext() - const [mods, setMods] = useState() - - useEffect(() => { - const call = async () => { - const filter: NDKFilter = { - kinds: [NDKKind.Classified], - '#l': [`com.degmods:${searchTerm}`] - } - - const ndkEventSet = await ndk.fetchEvents(filter) - const events = Array.from(ndkEventSet) - const mods: ModDetails[] = [] - events.map((e) => { - if (isModDataComplete(e)) { - const mod = extractModData(e) - mods.push(mod) - } - }) - setMods(mods) - } - - call() - }, [ndk, searchTerm]) - - return ( -
-
- {mods?.map((mod) => ( - - ))} -
-
- ) -}