import { Box } from "@mui/material";
import { Grid } from "../components/grid/Grid";
import { SPACING } from "../data/spacing";
import { useLocation } from "react-router-dom";
import { ROUTE_CITY_USER_FILE } from "../routes/routes";
import { CityUserFileInfo } from "../features/city/components/city-user-file-info/CityUserFileInfo";

const CityUserFile = () => {
  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_CITY_USER_FILE) && <CityUserFileInfo />}
            </Grid>
          </Grid>
        </Grid>
      </Box>
    </>
  );
};
export default CityUserFile;
