adminFront/src/Components/LoggedIn/Content/index.tsx

36 lines
789 B
TypeScript
Raw Normal View History

2022-09-08 17:21:17 +00:00
import * as React from "react";
import { Box } from "@mui/material";
2022-09-20 17:55:21 +00:00
import Users from "./Users";
import Promocode from "./Promocode";
import Support from "./Support";
2022-09-20 14:35:49 +00:00
import Tariffs from "./Tariffs";
2022-09-08 17:21:17 +00:00
2022-09-20 17:55:21 +00:00
export interface MWProps {
section: number
}
const Content: React.FC<MWProps> = ({ section }) => {
const componentsArray = [ <Users />, <Promocode />, <Support />, <Tariffs /> ];
2022-09-08 17:21:17 +00:00
return (
<React.Fragment>
<Box sx={{
width: "100%",
2022-09-10 18:39:16 +00:00
height: "calc(100vh - 85px)",
2022-09-08 17:21:17 +00:00
display: "flex",
flexDirection: "column",
2022-09-10 18:39:16 +00:00
alignItems: "center",
overflow: "auto",
overflowY: "auto",
padding: "60px"
2022-09-08 17:21:17 +00:00
}}>
2022-09-20 17:55:21 +00:00
{ componentsArray[ section ] }
2022-09-08 17:21:17 +00:00
</Box>
</React.Fragment>
);
}
export default Content;