import { getLists } from '@/lib/actions' import ListCard from '@/components/ListCard' import NewListButton from '@/components/NewListButton' import GlobalSearch from '@/components/GlobalSearch' import EmptyState from '@/components/EmptyState' import LogoutButton from '@/components/LogoutButton' import Link from 'next/link' import { getServerSession } from 'next-auth' import { authOptions } from '@/pages/api/auth/[...nextauth]' import { redirect } from 'next/navigation' export const dynamic = 'force-dynamic' export const revalidate = 0 export default async function Home() { const session = await getServerSession(authOptions) if (!session?.user) { redirect('/auth/login') } const lists = await getLists() return (

Ultimate Lists

{session?.user && ( <> Invitations Profile )}
{/* Global Search */}
{lists.length === 0 ? ( } /> ) : (
{lists.map((list) => ( ))}
)}
) }