add admin

This commit is contained in:
aurinex
2025-07-14 00:21:15 +05:00
parent 2bc57b7d0b
commit 4a5eba9826
9 changed files with 2894 additions and 9 deletions

View File

@ -0,0 +1,50 @@
import { Box, Typography, Container } from '@mui/material';
import Vehicle from './Vehicle';
import Personal from './Personal';
import { Navigate } from 'react-router-dom';
import Divider from '../../components/Divider';
const AdminMainPage = () => {
const isAuth = localStorage.getItem('token') !== null;
// Перенаправление на страницу логина, если пользователь не авторизован
if (!isAuth) {
return <Navigate to="/administrator" replace />;
}
return (
<Box sx={{ width: '100%', color: 'black', minHeight: '100vh' }}>
<Container maxWidth="lg" sx={{ pt: "1vw" }}>
<Box id="vehicles">
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: 'Unbounded',
fontWeight: 'bold'
}}
>
</Typography>
<Vehicle />
</Box>
<Divider marginBottomDivider='1vw' marginTopDivider='5vw' />
<Box id="personal">
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: 'Unbounded',
fontWeight: 'bold'
}}
>
</Typography>
<Personal />
</Box>
</Container>
</Box>
);
};
export default AdminMainPage;