diff --git a/app/(main)/ClientComponents/ServerDetailClient.tsx b/app/(main)/ClientComponents/ServerDetailClient.tsx index 006e821e3..7f4a10bde 100644 --- a/app/(main)/ClientComponents/ServerDetailClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailClient.tsx @@ -9,7 +9,7 @@ import { Card, CardContent } from "@/components/ui/card"; import getEnv from "@/lib/env-entry"; import { cn, formatBytes, nezhaFetcher } from "@/lib/utils"; import { useTranslations } from "next-intl"; -import { useRouter } from "next/navigation"; +import { notFound, useRouter } from "next/navigation"; import { useEffect, useState } from "react"; import useSWR from "swr"; import useSWRImmutable from "swr/immutable"; @@ -51,6 +51,10 @@ export default function ServerDetailClient({ (item) => item.id === server_id, ); + if (!fallbackData) { + notFound(); + } + const { data, error } = useSWR( `/api/detail?server_id=${server_id}`, nezhaFetcher, diff --git a/app/(main)/[id]/page.tsx b/app/(main)/server/[id]/page.tsx similarity index 100% rename from app/(main)/[id]/page.tsx rename to app/(main)/server/[id]/page.tsx diff --git a/app/not-found.tsx b/app/not-found.tsx index c16c1eec9..7b51dd535 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -2,30 +2,25 @@ import { useTranslations } from "next-intl"; import Image from "next/image"; import Link from "next/link"; +import Footer from "./(main)/footer"; +import Header from "./(main)/header"; + export default function NotFoundPage() { const t = useTranslations("NotFoundPage"); return ( -
-
- TARDIS -
-

- {t("h1_490-590_404NotFound")} -

-

- {t("p_601-665_TARDISERROR")} -

- - {t("Link_676-775_Doctor")} +
+
+
+
+

{t("h1_490-590_404NotFound")}

+ +

+ {t("h1_490-590_404NotFoundBack")} +

-
-
-
+ +