({ error }: Props)
| 8 | } |
| 9 | |
| 10 | export function SearchError({ error }: Props) { |
| 11 | const { t } = useTranslation('search') |
| 12 | const { locale, asPath } = useRouter() |
| 13 | |
| 14 | return ( |
| 15 | <div> |
| 16 | <Flash variant="danger" sx={{ margin: '3rem' }}> |
| 17 | {t('search_error')} |
| 18 | <br /> |
| 19 | {process.env.NODE_ENV === 'development' && <code>{error.toString()}</code>} |
| 20 | </Flash> |
| 21 | <Box> |
| 22 | {/* This deliberately uses a <a> instead of <Link> so it triggers a full reload. */} |
| 23 | <a href={`/${locale}${asPath}`}>Try reloading the page</a> |
| 24 | </Box> |
| 25 | </div> |
| 26 | ) |
| 27 | } |
nothing calls this directly
no test coverage detected