feat(web-next): render /about marketing page via marketingPages.pageBySlug

This commit is contained in:
2026-05-05 08:54:41 +02:00
parent 5f0a66581a
commit 293d855d06

View File

@@ -0,0 +1,31 @@
import { appRouter } from "@repo/core-api";
import { bindAllProduction } from "../../server/bind-production";
export default async function AboutPage() {
await bindAllProduction();
const caller = appRouter.createCaller({});
const page = await caller.marketingPages.pageBySlug({ slug: "about" });
if (!page) {
return (
<main>
<h1>About</h1>
<p>This page hasn't been published yet.</p>
</main>
);
}
return (
<main>
<article>
<header>
<h1>{page.hero.heading}</h1>
{page.hero.subheading ? <p>{page.hero.subheading}</p> : null}
</header>
<pre style={{ whiteSpace: "pre-wrap" }}>
{JSON.stringify(page.layout, null, 2)}
</pre>
</article>
</main>
);
}