2022-11-12 03:58:21 -05:00
|
|
|
import PageSeo from "app/components/page-seo"
|
2022-11-11 22:17:44 -05:00
|
|
|
import { getPostById } from "@lib/server/prisma"
|
|
|
|
|
|
|
|
export default async function Head({
|
|
|
|
params
|
|
|
|
}: {
|
|
|
|
params: {
|
2022-11-12 02:59:33 -05:00
|
|
|
id: string
|
2022-11-11 22:17:44 -05:00
|
|
|
}
|
|
|
|
}) {
|
2022-11-12 02:59:33 -05:00
|
|
|
const post = await getPostById(params.id)
|
2022-11-11 22:17:44 -05:00
|
|
|
|
|
|
|
if (!post) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<PageSeo
|
|
|
|
title={`${post.title} - Drift`}
|
2022-11-12 02:59:33 -05:00
|
|
|
description={post.description || undefined}
|
2022-11-11 22:17:44 -05:00
|
|
|
isPrivate={false}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|