'use client';

import { useSession } from 'next-auth/react';

import { CorporateLandingPage } from '@/components/corporate/CorporateLandingPage';
import Dashboard from '@/components/Dashboard';

export default function Home() {
  const { status } = useSession();

  if (status === 'authenticated') {
    return <Dashboard />;
  }

  // Public marketing site: avoid a blank "Loading..." flash for unauthenticated visitors.
  return <CorporateLandingPage />;
}
