Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 7afee2a

Browse files
author
Manuel Proß
committed
feat(web): redirect to not found page when no content was fetched
1 parent 20cbf08 commit 7afee2a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

web/src/app/[...slug]/page.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
22
import { getPageContent } from "@/helpers/getPageContent";
3+
import { notFound } from "next/navigation";
34

45
export default async function page({ params }: { params: { slug: string[] } }) {
56
try {
@@ -10,10 +11,6 @@ export default async function page({ params }: { params: { slug: string[] } }) {
1011
</div>
1112
);
1213
} catch (e) {
13-
return (
14-
<div>
15-
<p>No content defined in CMS.</p>
16-
</div>
17-
);
14+
notFound();
1815
}
1916
}

0 commit comments

Comments
 (0)