Refactor: expand the menu sidebar and add the server and docker detail page

This commit is contained in:
Tola Leng
2025-06-30 23:06:38 +07:00
parent 0b029dc914
commit 460fcbc7dc
4 changed files with 82 additions and 108 deletions
@@ -0,0 +1,16 @@
import { ReactNode } from 'react';
import { Navigate } from 'react-router-dom';
import { authService } from '@/services/authService';
interface ProtectedRouteProps {
children: ReactNode;
}
export const ProtectedRoute = ({ children }: ProtectedRouteProps) => {
if (!authService.isAuthenticated()) {
return <Navigate to="/login" replace />;
}
return <>{children}</>;
};