Skip to content

Commit

Permalink
add posts count
Browse files Browse the repository at this point in the history
  • Loading branch information
ynonp committed Dec 16, 2023
1 parent 2934a43 commit a855ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/posts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export default async function PostsPage() {
const posts = await prisma.post.findMany();

return (
<main className='p-2'>
<main className='p-2'>
<NewPost />
<p>Found {posts.length} posts</p>
<ul>
{posts.map(post => (
<li key={post.id}><b>{post.author}</b> {post.text}</li>
Expand Down

0 comments on commit a855ad2

Please sign in to comment.