Skip to content

Commit 3763bcc

Browse files
authored
Migrate deprecated MUI Grid to the new Grid2 component (yorkie-team#512)
* Migrate deprecated MUI Grid to the new Grid2 component This file hadn’t been updated like the others and uses the deprecated Grid API causing warnings. So migrated it to Grid2 to match the project’s MUI v6 version. * refactor: alias Grid2 as Grid for consistency Unified Grid2 imports across multiple files by aliasing it as Grid, improving seamless usage and readability.
1 parent 686b9d3 commit 3763bcc

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

frontend/src/pages/Index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Container, Divider, Grid, Paper, Stack, Typography } from "@mui/material";
1+
import { Box, Container, Divider, Grid2 as Grid, Paper, Stack, Typography } from "@mui/material";
22
import CodePairIcon from "../components/icons/CodePairIcon";
33
import { GithubLoginButton } from "react-social-login-buttons";
44

@@ -30,15 +30,15 @@ function Index() {
3030
</Box>
3131
<Stack gap={2}>
3232
<Grid container spacing={1} alignItems="center">
33-
<Grid item xs>
33+
<Grid size="grow">
3434
<Divider sx={{ width: 1 }} />
3535
</Grid>
36-
<Grid item xs="auto">
36+
<Grid size="auto">
3737
<Typography variant="body2" color="text.secondary">
3838
Login with
3939
</Typography>
4040
</Grid>
41-
<Grid item xs>
41+
<Grid size="grow">
4242
<Divider sx={{ width: 1 }} />
4343
</Grid>
4444
</Grid>

frontend/src/pages/workspace/Index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Box,
1010
Button,
1111
CircularProgress,
12-
Grid2,
12+
Grid2 as Grid,
1313
Paper,
1414
Stack,
1515
Tab,
@@ -140,17 +140,17 @@ function WorkspaceIndex() {
140140
}
141141
>
142142
<Box width={1}>
143-
<Grid2
143+
<Grid
144144
container
145145
spacing={{ xs: 2, md: 3 }}
146146
columns={{ xs: 4, sm: 8, md: 12, lg: 12 }}
147147
>
148148
{documentList.map((document) => (
149-
<Grid2 key={document.id} size={4}>
149+
<Grid key={document.id} size={4}>
150150
<DocumentCard document={document} />
151-
</Grid2>
151+
</Grid>
152152
))}
153-
</Grid2>
153+
</Grid>
154154
</Box>
155155
</InfiniteScroll>
156156
<CreateModal

0 commit comments

Comments
 (0)