Skip to content

Commit

Permalink
fix: remove double wraping of main (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Apr 16, 2024
1 parent 116c8d3 commit c3ae649
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/components/main/ItemForbiddenScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
import { Grid } from '@mui/material';
import { Stack } from '@mui/material';

import { Button, ForbiddenContent } from '@graasp/ui';

Expand All @@ -8,7 +8,6 @@ import { ITEM_LOGIN_SCREEN_FORBIDDEN_ID } from '../../config/selectors';
import { BUILDER } from '../../langs/constants';
import UserSwitchWrapper from '../common/UserSwitchWrapper';
import { useCurrentUserContext } from '../context/CurrentUserContext';
import Main from './Main';

const ItemForbiddenScreen = (): JSX.Element => {
const { data: member } = useCurrentUserContext();
Expand All @@ -23,21 +22,16 @@ const ItemForbiddenScreen = (): JSX.Element => {
);

return (
<Main>
<Grid
id={ITEM_LOGIN_SCREEN_FORBIDDEN_ID}
container
justifyContent="center"
alignItems="center"
textAlign="center"
height="90%"
>
<Grid item>
<ForbiddenContent memberId={member?.id} />
<UserSwitchWrapper ButtonContent={ButtonContent} />
</Grid>
</Grid>
</Main>
<Stack
id={ITEM_LOGIN_SCREEN_FORBIDDEN_ID}
direction="column"
justifyContent="center"
alignItems="center"
height="100%"
>
<ForbiddenContent memberId={member?.id} />
<UserSwitchWrapper ButtonContent={ButtonContent} />
</Stack>
);
};

Expand Down

0 comments on commit c3ae649

Please sign in to comment.