push rasad front on new repo
This commit is contained in:
45
src/pages/ChainCompany.js
Normal file
45
src/pages/ChainCompany.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Box } from "@mui/material";
|
||||
import React from "react";
|
||||
import { Grid } from "../components/grid/Grid";
|
||||
import { SPACING } from "../data/spacing";
|
||||
import { ChainCompanyActiveChains } from "../features/chain-company/components/chain-company-active-chains/ChainCompanyActiveChains";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import {
|
||||
ROUTE_CHAIN_COMPANY_MANAGE_BARS,
|
||||
ROUTE_CHAIN_COMPANY_POULTRIES,
|
||||
} from "../routes/routes";
|
||||
import { ChainBarManagement } from "../features/province/components/chain-bar-management/ChainBarManagement";
|
||||
|
||||
const ChainCompany = () => {
|
||||
const { pathname } = useLocation();
|
||||
return (
|
||||
<>
|
||||
<Box display={"flex"} justifyContent="center">
|
||||
<Grid
|
||||
container
|
||||
direction="column"
|
||||
justifyContent="center"
|
||||
xs={12}
|
||||
sm={12}
|
||||
md={10}
|
||||
lg={10}
|
||||
my={SPACING.MEDIUM}
|
||||
>
|
||||
<Grid container justifyContent="space-between" gap={SPACING.SMALL}>
|
||||
<Grid xs={12}>
|
||||
{pathname === ROUTE_CHAIN_COMPANY_POULTRIES && (
|
||||
<ChainCompanyActiveChains />
|
||||
)}
|
||||
|
||||
{pathname === ROUTE_CHAIN_COMPANY_MANAGE_BARS && (
|
||||
<ChainBarManagement />
|
||||
)}
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ChainCompany;
|
||||
Reference in New Issue
Block a user