From a474f3e4ee687374018da7fdd5c70a85cada31cf Mon Sep 17 00:00:00 2001 From: ajnart Date: Tue, 17 May 2022 01:44:26 +0200 Subject: [PATCH] :goal_net: Add 404 to catch errors Reduce the ammount of visible errors by adding a 404 page. --- src/pages/404.tsx | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 src/pages/404.tsx diff --git a/src/pages/404.tsx b/src/pages/404.tsx new file mode 100644 index 000000000..8dd04f06e --- /dev/null +++ b/src/pages/404.tsx @@ -0,0 +1,95 @@ +import React from 'react'; +import { + createStyles, + Container, + Title, + Text, + Button, + Group, + useMantineTheme, +} from '@mantine/core'; +import { NextLink } from '@mantine/next'; + +const useStyles = createStyles((theme) => ({ + root: { + paddingTop: 80, + paddingBottom: 80, + }, + + inner: { + position: 'relative', + }, + + image: { + position: 'absolute', + top: 0, + right: 0, + left: 0, + zIndex: 0, + opacity: 0.75, + }, + + content: { + paddingTop: 220, + position: 'relative', + zIndex: 1, + + [theme.fn.smallerThan('sm')]: { + paddingTop: 120, + }, + }, + + title: { + fontFamily: `Greycliff CF, ${theme.fontFamily}`, + textAlign: 'center', + fontWeight: 900, + fontSize: 38, + + [theme.fn.smallerThan('sm')]: { + fontSize: 32, + }, + }, + + description: { + maxWidth: 540, + margin: 'auto', + marginTop: theme.spacing.xl, + marginBottom: theme.spacing.xl * 1.5, + }, +})); + +export function Illustration(props: React.ComponentPropsWithoutRef<'svg'>) { + const theme = useMantineTheme(); + return ( + + + + ); +} + +export default function NothingFoundBackground() { + const { classes } = useStyles(); + + return ( + +
+ +
+ Nothing to see here + + Page you are trying to open does not exist. You may have mistyped the address, or the + page has been moved to another URL. If you think this is an error contact support. + + + + + + +
+
+
+ ); +}