-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SlugNotFound component and update en.json for news page
- Loading branch information
1 parent
6cb9806
commit 1fb66df
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Link from "next/link"; | ||
import { useTranslations } from "next-intl"; | ||
|
||
export default function SlugNotFound() { | ||
const t = useTranslations("news.notFound"); | ||
|
||
return ( | ||
<div className="pt-10 pb-24 sm:pt-12 sm:pb-32"> | ||
<div className="mx-auto max-w-3xl text-base leading-7"> | ||
<h1 className="mt-2 text-3xl font-bold tracking-tight sm:text-4xl mb-12 text-center font-display"> | ||
{t("title")} | ||
</h1> | ||
<div className="prose dark:prose-invert prose-headings:font-display prose-a:text-primary prose-pre:bg-muted prose-pre:py-3 prose-pre:px-4 prose-pre:rounded prose-img:rounded-md max-w-none"> | ||
{t.rich("description", { | ||
newsLink: (chunks) => <Link href="/news">{chunks}</Link>, | ||
})} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters