import SectionContainer from "@/components/ui/section-container"; import PostCard from "@/components/ui/post-card"; import Link from "next/link"; import { fetchSanityPosts } from "@/sanity/lib/fetch"; import { type DynamicFetchOptions } from "@/sanity/lib/live"; import { PAGE_QUERY_RESULT } from "@/sanity.types"; type AllPostsProps = Extract< NonNullable["blocks"]>[number], { _type: "all-posts" } >; export default async function AllPosts({ padding, colorVariant, perspective, stega, }: AllPostsProps & DynamicFetchOptions) { const posts = await fetchSanityPosts({ perspective, stega }); return (
{posts.map((post) => ( ))}
); }