You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Drift/client/app/(posts)/new/from/[id]/page.tsx

27 lines
451 B
TypeScript

import NewPost from "../../components/new"
import { notFound } from "next/navigation"
import { getPostById } from "@lib/server/prisma"
const NewFromExisting = async ({
params
}: {
params: {
id: string
}
}) => {
const { id } = params
if (!id) {
return notFound()
}
const post = await getPostById(id, {
withFiles: true,
withAuthor: false
})
return <NewPost initialPost={post} newPostParent={id} />
}
export default NewFromExisting