import { CompanyDetail } from '@/components/companies/company-detail';
import { auth } from '@/lib/auth';
import { headers } from 'next/headers';

interface CompanyDetailPageProps {
  params: Promise<{ companyId: string }>;
}

export default async function CompanyDetailPage({ params }: CompanyDetailPageProps) {
  const { companyId } = await params;

  const session = await auth.api.getSession({ headers: await headers() });
  const currentUserId = session?.user?.id;

  return <CompanyDetail companyId={companyId} currentUserId={currentUserId} />;
}
