initial commit
This commit is contained in:
1 parent
b47e17fe91
commit
9b60e32125
4 files changed
+83
-88
No files matched your search
@@ -0,0 +1,62 @@
|
||||
import NotFoundSvg from "@/assets/Images/sushi_404.svg";
|
||||
import { Button } from "@/Components/v2/inputs";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useTheme } from "@mui/material";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
interface NotFoundProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
const NotFoundPage = ({ title, desc }: NotFoundProps) => {
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!title || title === "") {
|
||||
title = t("pages.notFound.title");
|
||||
}
|
||||
|
||||
if (!desc || desc === "") {
|
||||
desc = t("pages.notFound.subtitle");
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack
|
||||
height="100vh"
|
||||
justifyContent="center"
|
||||
>
|
||||
<Stack
|
||||
gap={theme.spacing(2)}
|
||||
alignItems="center"
|
||||
>
|
||||
<img
|
||||
src={NotFoundSvg}
|
||||
alt="404"
|
||||
style={{ maxHeight: "25rem" }}
|
||||
/>
|
||||
<Typography
|
||||
component="h1"
|
||||
variant="h1"
|
||||
>
|
||||
{title}
|
||||
</Typography>
|
||||
<Typography variant="body1">{desc}</Typography>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
sx={{ mt: theme.spacing(10) }}
|
||||
onClick={() => navigate("/")}
|
||||
>
|
||||
{t("common.buttons.notFound")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFoundPage;
|
||||
Reference in new issue
Block a user