import { Box, Flash } from '@primer/react' import { useRouter } from 'next/router' import { useTranslation } from 'components/hooks/useTranslation' interface Props { error: Error } export function SearchError({ error }: Props) { const { t } = useTranslation('search') const { locale, asPath } = useRouter() return (
{t('search_error')}
{process.env.NODE_ENV === 'development' && {error.toString()}}
{/* This deliberately uses a instead of so it triggers a full reload. */} Try reloading the page
) }