add publish date to news article

This commit is contained in:
2024-05-21 01:44:57 +02:00
parent 8d540c16b8
commit d57a226184

View File

@ -3,6 +3,7 @@ import { NewsFragment } from "@/gql/graphql";
import { getClient } from "@/app/client";
import { Blocks } from "@/components/blocks/Blocks";
import Image from "@/components/general/Image";
import { formatDate, commonDateFormat } from "@/lib/date";
export async function generateStaticParams() {
const allNewsSlugsQuery = graphql(`
@ -61,6 +62,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
)}
</figure>
)}
<p>{formatDate(news.firstPublishedAt, commonDateFormat)}</p>
</section>
<section className="page-content">
<Blocks blocks={news.body} />