initial commit
This commit is contained in:
19
app/post.tsx
Normal file
19
app/post.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { Prisma } from "../generated/prisma/client"
|
||||
|
||||
type PostWithPet = Prisma.PostGetPayload<{
|
||||
include: { pet: true }
|
||||
}>;
|
||||
|
||||
interface PostProps {
|
||||
postData: PostWithPet;
|
||||
}
|
||||
|
||||
export default async function Post({ postData }: PostProps) {
|
||||
return <>
|
||||
<h1>{postData.petId}</h1>
|
||||
<p>{postData.content}</p>
|
||||
<br/>
|
||||
<p>Posted by a: <b>{postData.pet.species}</b> called <b>{postData.pet.name}</b></p>
|
||||
<hr/>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user