import { Navigate, useLocation } from 'react-router-dom' import { useAuthStore } from '@/store/authStore' interface ProtectedRouteProps { children: React.ReactNode } export function ProtectedRoute({ children }: ProtectedRouteProps) { const { isAuthenticated, isLoading } = useAuthStore() const location = useLocation() if (isLoading) { return (