fix: Remove unused import in ProtectedRoute (Refs #2)

This commit is contained in:
2026-04-01 14:24:25 -03:00
parent 7b9a7192c1
commit 4b44a8da08
8 changed files with 37 additions and 20 deletions

View File

@@ -1,14 +1,15 @@
import { Navigate, Outlet } from 'react-router-dom';
import { Navigate } from 'react-router-dom';
import { useAuth } from '../hooks/useAuth';
import type { PropsWithChildren } from 'react';
const ProtectedRoute = () => {
const ProtectedRoute = ({ children }: PropsWithChildren<{}>) => {
const { isAuthenticated } = useAuth();
if (!isAuthenticated) {
return <Navigate to="/login" replace />;
}
return <Outlet />;
return children;
};
export default ProtectedRoute;