import { getServerSession } from "next-auth"; import { redirect } from "next/navigation"; import { authOptions } from "@/lib/auth"; import { getLinks } from "@/lib/services/links"; import LinkCard from "./LinkCard"; export default async function LinksGrid() { const session = await getServerSession(authOptions); if (!session) { redirect("/"); } const links = await getLinks(session.user.id); return (
{links.map((l) => ( ))}
); }