From e8eff6c2cb7e473951012d4d53b20307d1d0c971 Mon Sep 17 00:00:00 2001 From: Amirhossein Khalili Date: Sun, 7 Jun 2026 12:49:38 +0330 Subject: [PATCH] fix(routing): simplify not found page --- src/pages/NotFound.tsx | 96 ++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index b7e2db0..580f8f4 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -1,70 +1,48 @@ -import { Link, useLocation } from "react-router-dom" -import { ArrowLeft, ArrowRight, Command, Compass, Home } from "lucide-react" +import { useNavigate } from "react-router-dom" +import { ArrowLeft, ArrowRight, Home } from "lucide-react" import { Button } from "../components/ui/button" import { useTranslation } from "../hooks/useTranslation" -import { cn } from "../lib/utils" export default function NotFound() { - const location = useLocation() - const { lang, t } = useTranslation() + const navigate = useNavigate() + const { lang } = useTranslation() const isFa = lang === "fa" return ( -
-
-
- -
-
-
-
-
- - {isFa ? "مسیر پیدا نشد" : "Route not found"} -
-

- 404 -

-

- {isFa - ? "این آدرس در رابط کاربری Qlockify تعریف نشده است." - : "This endpoint is not defined in the Qlockify interface."} -

-
- {location.pathname} -
-
- -
- - -
-
+
+
+
+ 404
-
-
+

+ {isFa ? "صفحه پیدا نشد" : "Page not found"} +

+

+ {isFa + ? "این صفحه وجود ندارد یا آدرس آن تغییر کرده است." + : "This page does not exist or its address has changed."} +

+
+ + +
+ +
) }