import { Box } from "@mui/material";
import { Grid } from "../components/grid/Grid";
import { SPACING } from "../data/spacing";
import { useLocation } from "react-router-dom";
import GuildMaangeGuilds from "../features/guild/components/GuildManageGuilds";
import { ROUTE_STEWARD_MANAGE_GUILDS } from "../routes/routes";

const GuildManageGuildsPage = () => {
  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 === ROUTE_STEWARD_MANAGE_GUILDS && (
                <GuildMaangeGuilds />
              )}
            </Grid>
          </Grid>
        </Grid>
      </Box>
    </>
  );
};

export default GuildManageGuildsPage;
