import { getServerSession } from "next-auth/next"; import { authOptions } from "@/app/api/auth/options"; import { redirect } from "next/navigation"; import { Suspense } from "react"; import { QuoteCard } from "@/components/quote-card"; import { Calendar } from "@/components/calendar"; import { News } from "@/components/news"; import { Duties } from "@/components/flow"; import { Email } from "@/components/email"; import { Parole } from "@/components/parole"; import { HomeLogoutCheck } from "@/components/home-logout-check"; // Loading skeleton components function QuoteCardSkeleton() { return (
); } function CalendarSkeleton() { return (
); } function NewsSkeleton() { return (
); } function DutiesSkeleton() { return (
); } function EmailSkeleton() { return (
); } function ParoleSkeleton() { return (
); } export default async function Home() { // Check authentication on server side const session = await getServerSession(authOptions); if (!session) { redirect("/signin"); } return ( <>
{/* First row */}
}>
}>
}>
}>
{/* Second row */}
}>
}>
); }