import Image from "next/image" import Card from "@components/card" import { getWelcomeContent } from "pages/api/welcome" import DocumentTabs from "./(posts)/components/tabs" import { getAllPosts, Post } from "@lib/server/prisma" import PostList from "@components/post-list" const getWelcomeData = async () => { const welcomeContent = await getWelcomeContent() return welcomeContent } export default async function Page() { const { content, rendered, title } = await getWelcomeData() const getPostsPromise = getAllPosts({ where: { visibility: "public" } }) return (

{title}

Recent public posts

{/* @ts-ignore because of async RSC */}
) } async function PublicPostList({ getPostsPromise }: { getPostsPromise: Promise }) { const posts = await getPostsPromise return ( ) } export const revalidate = 60