初始化项目

This commit is contained in:
mmc
2026-04-17 17:20:41 +08:00
commit 6122e884fe
27 changed files with 7881 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import React from 'react';
import { Navigate, Outlet } from 'react-router-dom';
export default function ProtectedRoute() {
const isAuthenticated = localStorage.getItem('isAuthenticated') === 'true';
if (!isAuthenticated) {
return <Navigate to="/login" replace />;
}
return <Outlet />;
}