export async function getPostGrid(id: number, page = 1) {
    const res = await fetch(
        `${process.env.NEXT_PUBLIC_API_URL || "http://localhost:3490"}/api/post-grids/${id}?page=${page}`,
        { next: { revalidate: 60 } } // ISR
    );

    if (!res.ok) return null;
    return res.json();
}