Wrap next/link in a shared Link component that ships prefetch=false by default, so no route is ever prefetched (viewport or hover) anymore, and drop the DNS prefetch hint. Removes hidden background requests that were the source of intermittent issues.
30 lines
752 B
TypeScript
30 lines
752 B
TypeScript
import { Home, Newspaper } from "lucide-react";
|
|
import { getTranslations } from "next-intl/server";
|
|
import { ErrorScreen } from "@/components/error-screen";
|
|
import Link from "@/components/link";
|
|
|
|
export default async function NotFound() {
|
|
const t = await getTranslations("pages.notFound");
|
|
|
|
return (
|
|
<ErrorScreen
|
|
code={t("code")}
|
|
title={t("title")}
|
|
subtitle={t("subtitle")}
|
|
body={t("body")}
|
|
actions={
|
|
<>
|
|
<Link className="btn btn-primary" href="/">
|
|
<Home className="error-screen-btn-icon" aria-hidden />
|
|
{t("backHome")}
|
|
</Link>
|
|
<Link className="btn btn-outline" href="/news">
|
|
<Newspaper className="error-screen-btn-icon" aria-hidden />
|
|
{t("latestNews")}
|
|
</Link>
|
|
</>
|
|
}
|
|
/>
|
|
);
|
|
}
|