1
0
Fork 0
pingvin-share/frontend/src/pages/404.tsx

67 lines
1.4 KiB
TypeScript
Raw Normal View History

2022-05-11 11:36:51 +02:00
import {
Button,
Container,
2023-03-10 09:01:33 +01:00
createStyles,
2022-05-11 11:36:51 +02:00
Group,
2023-03-10 09:01:33 +01:00
Text,
Title,
2022-05-11 11:36:51 +02:00
} from "@mantine/core";
2022-10-31 11:20:54 +01:00
import Link from "next/link";
2023-03-10 09:01:33 +01:00
import Meta from "../components/Meta";
import { FormattedMessage } from "react-intl";
2022-05-11 11:36:51 +02:00
2024-03-22 01:35:55 +01:00
const webroot = process.env.WEBROOT || "";
2022-05-11 11:36:51 +02:00
const useStyles = createStyles((theme) => ({
root: {
paddingTop: 80,
paddingBottom: 80,
},
label: {
textAlign: "center",
fontWeight: 900,
fontSize: 220,
lineHeight: 1,
2023-03-10 09:01:33 +01:00
marginBottom: `calc(${theme.spacing.xl} * 100)`,
2022-05-11 11:36:51 +02:00
color: theme.colors.gray[2],
[theme.fn.smallerThan("sm")]: {
fontSize: 120,
},
},
description: {
maxWidth: 500,
margin: "auto",
2023-03-10 09:01:33 +01:00
marginBottom: `calc(${theme.spacing.xl} * 100)`,
2022-05-11 11:36:51 +02:00
},
}));
const ErrorNotFound = () => {
const { classes } = useStyles();
2024-03-22 12:18:18 +01:00
2022-05-11 11:36:51 +02:00
return (
<>
<Meta title="Not found" />
<Container className={classes.root}>
2023-08-17 14:47:58 +02:00
<div className={classes.label}>404</div>
2022-05-11 11:36:51 +02:00
<Title align="center" order={3}>
<FormattedMessage id="404.description" />
2022-05-11 11:36:51 +02:00
</Title>
2022-05-11 19:57:30 +02:00
<Text
color="dimmed"
align="center"
className={classes.description}
></Text>
2022-05-11 11:36:51 +02:00
<Group position="center">
2024-03-22 01:35:55 +01:00
<Button component={Link} href={webroot + "/"} variant="light">
<FormattedMessage id="404.button.home" />
2022-05-11 19:57:30 +02:00
</Button>
2022-05-11 11:36:51 +02:00
</Group>
</Container>
</>
);
};
export default ErrorNotFound;