CoastalCommitsPastes/client/app/(posts)/post/[id]/head.tsx

25 lines
372 B
TypeScript
Raw Normal View History

2022-11-12 04:28:06 -05:00
import PageSeo from "@components/page-seo"
import { getPostById } from "@lib/server/prisma"
export default async function Head({
params
}: {
params: {
id: string
}
}) {
const post = await getPostById(params.id)
if (!post) {
return null
}
return (
<PageSeo
title={post.title}
description={post.description || undefined}
isPrivate={false}
/>
)
}