import { Button, Center, Stack, Text, Title, createStyles } from '@mantine/core'; import { GetServerSidePropsContext } from 'next'; import Head from 'next/head'; import Image from 'next/image'; import Link from 'next/link'; import { useTranslation } from 'next-i18next'; import pageNotFoundImage from '~/images/undraw_page_not_found_re_e9o6.svg'; import { pageNotFoundNamespaces } from '~/tools/server/translation-namespaces'; import { getServerSideTranslations } from '../tools/server/getServerSideTranslations'; export default function Custom404() { const { classes } = useStyles(); const { t } = useTranslation('layout/errors/not-found'); return (
Page not found • Homarr {t('title')} {t('text')}
); } export async function getStaticProps({ req, res, locale }: GetServerSidePropsContext) { const translations = await getServerSideTranslations( [...pageNotFoundNamespaces, 'common'], locale, req, res ); return { props: { ...translations, }, }; } const useStyles = createStyles(() => ({ image: { margin: '0 auto', display: 'block', }, }));