This commit is contained in:
aurinex
2025-07-14 17:30:13 +05:00
parent 577fa5a17f
commit f74949836a
4 changed files with 1763 additions and 718 deletions

View File

@ -1,45 +1,43 @@
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';
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;
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 sx={{ width: "100%", color: "black", minHeight: "100vh" }}>
<Container maxWidth="xl" sx={{ pt: "1vw" }}>
<Box id="vehicles">
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: 'Unbounded',
fontWeight: 'bold'
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: "Unbounded",
fontWeight: "bold",
}}
>
</Typography>
></Typography>
<Vehicle />
</Box>
<Divider marginBottomDivider='1vw' marginTopDivider='5vw' />
<Divider marginBottomDivider="1vw" marginTopDivider="5vw" />
<Box id="personal">
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: 'Unbounded',
fontWeight: 'bold'
<Typography
variant="h5"
component="h2"
sx={{
fontFamily: "Unbounded",
fontWeight: "bold",
}}
>
</Typography>
></Typography>
<Personal />
</Box>
</Container>