import { clsx } from 'clsx' import { useLocalize } from '~/context/localize' import { Icon } from '../_shared/Icon' import { useNavigate } from '@solidjs/router' import styles from '../../styles/FourOuFour.module.scss' type EvType = Event & { submitter: HTMLElement } & { currentTarget: HTMLFormElement; target: Element } export const FourOuFourView = () => { let queryInput: HTMLInputElement | null const navigate = useNavigate() const search = (_ev: EvType) => navigate(`/search?q=${queryInput?.value || ''}`) const { t } = useLocalize() return (
{t('Error')}
404

{t(`You've reached a non-existed page`)}

{t('Try to find another way')}:

search(ev)} >
(queryInput = el)} />

{t('Back to main page')}

) }