web: move page rendering logic from page.tsx to components
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user