import { PropsWithChildren, FC } from 'react'; import { Navigate, useLocation } from 'react-router-dom'; import { useAuth } from '@/providers/authProvider.tsx'; export const PrivateRoute: FC = ({ children }) => { const { token } = useAuth(); const location = useLocation(); if (!token) { return ; } return children; };