add publish date to news article
This commit is contained in:
@ -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} />
|
||||
|
Reference in New Issue
Block a user