24 lines
385 B
TypeScript
24 lines
385 B
TypeScript
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} - Drift`}
|
|
description={post.description || undefined}
|
|
isPrivate={false}
|
|
/>
|
|
)
|
|
}
|