diff --git a/src/components/Nav/SearchModal/SearchModal.tsx b/src/components/Nav/SearchModal/SearchModal.tsx index 9dad8cdb..a61f73b1 100644 --- a/src/components/Nav/SearchModal/SearchModal.tsx +++ b/src/components/Nav/SearchModal/SearchModal.tsx @@ -1,41 +1,24 @@ import { clsx } from 'clsx' -import { createEffect, createSignal } from 'solid-js' - import { useLocalize } from '../../../context/localize' -import { apiClient } from '../../../graphql/client/core' -import { SearchResult } from '../../../graphql/schema/core.gen' import { Icon } from '../../_shared/Icon' import styles from './SearchModal.module.scss' export const SearchModal = () => { const { t } = useLocalize() - const [searchResults, setSearchResults] = createSignal>([]) + let qElement: HTMLInputElement | undefined - let msgElement: HTMLTextAreaElement | undefined - let contactElement: HTMLInputElement | undefined - - const submit = async () => { - const results = await apiClient.getShoutsSearch({ text: msgElement.value }) - - if (results) setSearchResults(results) + const submitQuery = async (ev) => { + ev.preventDefault() + window.history.pushState({}, '', '/search?q=' + qElement.value) } - - createEffect(() => { - if (searchResults()) { - // TODO: some showing logics - } - }) - - // TODO: useLocalize() - return ( -
+ +
  • - +
  • - +