import { client } from "../../sanity/client"; import type { SanityDocument } from "next-sanity"; import { AnimatedBlogCard } from "../../components/ui/animated-blog-card"; import { AnimatedBlogHeader } from "../../components/ui/animated-blog-header"; import { allPostsQuery } from './queries'; const options = { next: { revalidate: 30 } }; interface BlogPost extends SanityDocument { title: string; slug: string; publishedAt: string; excerpt?: string; mainImage?: { image: { asset: { _id: string; url: string; metadata: { dimensions: { width: number; height: number; }; }; }; }; }; } export default async function BlogPage() { const posts = await client.fetch(allPostsQuery, {}, options); return (
{posts.map((post, index) => ( ))}
{posts.length === 0 && (

No Posts Yet

Check back soon for our latest articles and insights.

)}
); }