fix: pageNotFound

This commit is contained in:
hamster1963
2024-11-26 14:19:19 +08:00
parent 17ddce7b0e
commit ea92c91942
6 changed files with 42 additions and 1 deletions

22
src/pages/NotFound.tsx Normal file
View File

@@ -0,0 +1,22 @@
import { Button } from "@/components/ui/button";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
export default function NotFound() {
const navigate = useNavigate();
const { t } = useTranslation();
return (
<div className="flex flex-col items-center justify-center">
<div className="flex flex-col items-center gap-2">
<h1 className="text-4xl font-semibold">404</h1>
<p className="text-xl text-muted-foreground">
{t("error.pageNotFound")}
</p>
<Button onClick={() => navigate("/")} className="mt-2">
{t("error.backToHome")}
</Button>
</div>
</div>
);
}