From 5f0a66581a002bb67e54c84152e7aa032cdd36bd Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Tue, 5 May 2026 08:54:20 +0200 Subject: [PATCH] feat(web-next): render homepage with siteSettings + header + article list --- apps/web-next/src/app/page.tsx | 47 +++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/apps/web-next/src/app/page.tsx b/apps/web-next/src/app/page.tsx index 83af98d..4b4cfd1 100644 --- a/apps/web-next/src/app/page.tsx +++ b/apps/web-next/src/app/page.tsx @@ -1,8 +1,49 @@ -export default function Home() { +import Link from "next/link"; +import { appRouter } from "@repo/core-api"; +import { bindAllProduction } from "../server/bind-production"; + +export default async function Home() { + await bindAllProduction(); + const caller = appRouter.createCaller({}); + + const [siteSettings, header, articles] = await Promise.all([ + caller.marketingPages.siteSettings(), + caller.navigation.header(), + caller.blog.listArticles({ status: "published", limit: 20 }), + ]); + return (
-

Template — Next.js

-

Clean Architecture Monorepo Template

+
+

{siteSettings.siteName}

+ {siteSettings.siteDescription ? ( +

{siteSettings.siteDescription}

+ ) : null} + +
+ +
+

Latest articles

+ {articles.length === 0 ? ( +

No published articles yet.

+ ) : ( +
    + {articles.map((a) => ( +
  • + {a.title} +
  • + ))} +
+ )} +
); }