import { Navigate } from 'react-router-dom';
import type { ReactNode } from 'react';
import { useAuth } from '../../context/AuthContext';
export function ProtectedRoute({ children }: { children: ReactNode }) {
const { user, needsSetup } = useAuth();
if (needsSetup) return ;
if (!user) return ;
return <>{children}>;
}