import React from 'react'; import { Navigate, Outlet } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAuth } from '../contexts/AuthContext'; interface ProtectedRouteProps { redirectPath?: string; } const ProtectedRoute: React.FC = ({ redirectPath = '/login' }) => { const { t } = useTranslation(); const { auth } = useAuth(); if (auth.loading) { return
{t('app.loading')}
; } if (!auth.isAuthenticated) { return ; } return ; }; export default ProtectedRoute;