import PostList from "@components/post-list" import { getPostsByUser, getUserById } from "@lib/server/prisma" import { Suspense } from "react" async function PostListWrapper({ posts, userId }: { posts: ReturnType userId: string }) { const data = (await posts).filter((post) => post.visibility === "public") return ( ) } export default async function UserPage({ params }: { params: { username: string } }) { // TODO: the route should be user.name, not id const id = params.username const user = await getUserById(id) const posts = getPostsByUser(id, true) return ( <>

Public posts by {user?.displayName || "Anonymous"}

}> {/* @ts-ignore because TS async JSX support is iffy */} ) }