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

24 lines
376 B
TypeScript

import PageSeo from "@components/page-seo"
import { getPostById } from "@lib/server/prisma"
export default async function Head({
params
}: {
params: {
slug: string
}
}) {
const post = await getPostById(params.slug)
if (!post) {
return null
}
return (
<PageSeo
title={`${post.title} - Drift`}
description={post.description}
isPrivate={false}
/>
)
}