import { prisma } from "../lib/prisma"
import Link from 'next/link'
import Post from './post'

const allPosts = await prisma.post.findMany({
  include: {
    pet: true
  }
});

export default async function Page() {
  const posts = allPosts.map(item => <Post key={item.id} postData={item}></Post>);
  return <>
    <h1>Posts</h1>
    {posts}
    </>
}


