import type { ReactNode } from "react"; import { Redirect } from "wouter"; import { useAuth } from "../contexts/AuthContext"; interface Props { children: ReactNode; } export function ProtectedRoute({ children }: Props) { const { user, isLoading } = useAuth(); if (isLoading) { return (