import { Box } from "@mui/material";
import { Grid } from "../components/grid/Grid";
import { SPACING } from "../data/spacing";
import { ROUTE_VETFARM_INSPECTIONS } from "../routes/routes";
import { useLocation } from "react-router-dom";
import { VetFarmInspectionHistory } from "../features/vet-farm/components/vet-farm-inspection-history/VetFarmInspectionHistory";

const VetFarmInspections = () => {
  const { pathname } = useLocation();

  return (
    <>
      <Box display={"flex"} justifyContent="center">
        <Grid
          container
          direction="column"
          justifyContent="center"
          xs={12}
          sm={12}
          md={10}
          lg={10}
        >
          <Grid container justifyContent="space-between" gap={SPACING.SMALL}>
            <Grid xs={12}>
              {pathname.includes(ROUTE_VETFARM_INSPECTIONS) && (
                <VetFarmInspectionHistory />
              )}
            </Grid>
          </Grid>
        </Grid>
      </Box>
    </>
  );
};
export default VetFarmInspections;
