push rasad front on new repo
This commit is contained in:
31
src/pages/DashboardPage.js
Normal file
31
src/pages/DashboardPage.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Box } from "@mui/material";
|
||||
import { Grid } from "../components/grid/Grid";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import {
|
||||
ROUTE_ADMINX_DASHBOARD,
|
||||
ROUTE_PROVINCE_DASHBOARD,
|
||||
ROUTE_PROVINCE_SUPERVISOR_DASHBOARD,
|
||||
ROUTE_SUPER_ADMIN_DASHBOARD,
|
||||
} from "../routes/routes";
|
||||
import { DashboardTab } from "../features/dashboard/components/dashboard-tab/DashboardTab";
|
||||
import { BackButton } from "../components/back-button/BackButton";
|
||||
|
||||
const DashboardPage = () => {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
return (
|
||||
<Box display="flex" justifyContent="center" pb={20}>
|
||||
<Grid container xs={12} sm={12} md={10} lg={10}>
|
||||
<BackButton />
|
||||
{(pathname.includes(ROUTE_ADMINX_DASHBOARD) ||
|
||||
pathname.includes(ROUTE_SUPER_ADMIN_DASHBOARD) ||
|
||||
pathname.includes(ROUTE_PROVINCE_DASHBOARD) ||
|
||||
pathname.includes(ROUTE_PROVINCE_SUPERVISOR_DASHBOARD)) && (
|
||||
<DashboardTab />
|
||||
)}
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardPage;
|
||||
Reference in New Issue
Block a user