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

Commit f39156b

Browse files
author
Manuel Proß
committed
refactor(web): readd render logic of slug page
1 parent 9824dfb commit f39156b

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import React from "react";
2+
import { getPageContent } from "@/helpers/getPageContent";
23

34
export default async function page({ params }: { params: { slug: string[] } }) {
4-
return (
5-
<div>
6-
<h1 className="h1-prefix">Placeholder</h1>
7-
<p>{params.slug[0]}</p>
8-
</div>
9-
);
5+
try {
6+
const { page } = await getPageContent(params.slug);
7+
return (
8+
<div>
9+
<h1>{page.pageTitle}</h1>
10+
</div>
11+
);
12+
} catch (e) {
13+
return (
14+
<div>
15+
<p>No content defined in CMS.</p>
16+
</div>
17+
);
18+
}
1019
}

0 commit comments

Comments
 (0)