59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
// src/pages/Dashboard
|
|
|
|
import * as React from "react";
|
|
import { Box, CssBaseline, Typography } from "@mui/material";
|
|
|
|
import {
|
|
chartsCustomizations,
|
|
dataGridCustomizations,
|
|
datePickersCustomizations,
|
|
treeViewCustomizations,
|
|
} from "./theme/customizations";
|
|
import DashboardLayout from "../../layouts/DashboardLayout";
|
|
import AppTheme from "../../shared-theme/AppTheme";
|
|
import MainGrid from "../../components/MainGrid";
|
|
import AdminList from "../AdminList";
|
|
|
|
const xThemeComponents = {
|
|
...chartsCustomizations,
|
|
...dataGridCustomizations,
|
|
...datePickersCustomizations,
|
|
...treeViewCustomizations,
|
|
};
|
|
|
|
interface DashboardProps {
|
|
disableCustomTheme?: boolean;
|
|
}
|
|
|
|
const Dashboard: React.FC<DashboardProps> = ({
|
|
disableCustomTheme = false,
|
|
}) => {
|
|
return (
|
|
<AppTheme
|
|
{...{ disableCustomTheme }}
|
|
themeComponents={xThemeComponents}
|
|
>
|
|
<CssBaseline enableColorScheme />
|
|
{!disableCustomTheme ? (
|
|
<>
|
|
<MainGrid />
|
|
</>
|
|
) : (
|
|
<Box
|
|
sx={{
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
backgroundColor: "#202020",
|
|
height: "100vh",
|
|
textAlign: "center",
|
|
padding: 2,
|
|
}}
|
|
></Box>
|
|
)}
|
|
</AppTheme>
|
|
);
|
|
};
|
|
|
|
export default Dashboard;
|