web: move page rendering logic from page.tsx to components

This commit is contained in:
2026-05-19 17:00:12 +02:00
parent cf945d8647
commit 0c5a9876d6
30 changed files with 1419 additions and 1239 deletions
+2 -8
View File
@@ -1,7 +1,6 @@
import { getClient } from "@/app/client";
import { NewsList } from "@/components/news/NewsList";
import { NewsIndexView } from "@/components/news/NewsIndexView";
import { Metadata, ResolvingMetadata } from "next";
import { PageHeader } from "@/components/general/PageHeader";
import { newsQuery, NewsFragment, NewsIndexFragment } from "@/lib/news";
import { getSeoMetadata } from "@/lib/seo";
@@ -30,10 +29,5 @@ export default async function Page() {
const news = (data?.news ?? []) as NewsFragment[];
const index = data?.index as NewsIndexFragment;
return (
<main className="site-main" id="main">
<PageHeader heading={index.title} lead={index.lead} align="left" />
<NewsList news={news} />
</main>
);
return <NewsIndexView index={index} news={news} />;
}