Skip to content

Commit 6c4d874

Browse files
committed
fix: resolve ui problems
1 parent 2ac6a1b commit 6c4d874

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed
14.2 KB
Loading

src/app/[locale]/(main)/loading.tsx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1-
import { Box, Grid, Skeleton } from '@mui/material';
1+
import { Box, Container, Grid, Skeleton } from '@mui/material';
22

33
const Loading = () => {
44
return (
5-
<>
6-
<Skeleton variant="rectangular" height={350} />
7-
<Grid container spacing={1}>
8-
{new Array(4).fill(1).map((item, index) => {
9-
return (
10-
<Grid key={index} item xs={12} md={6} lg={4} xl={3}>
11-
<Box>
12-
<Skeleton variant="rectangular" height={120} />
13-
<Skeleton variant="text" width={60} />
14-
</Box>
15-
</Grid>
16-
);
17-
})}
5+
<Container maxWidth="xl">
6+
<Grid container spacing={2}>
7+
<Grid item xs={12}>
8+
<Skeleton variant="rectangular" height={350} />
9+
</Grid>
10+
<Grid item xs={12}>
11+
<Grid container spacing={2}>
12+
{new Array(4).fill(1).map((item, index) => {
13+
return (
14+
<Grid key={index} item xs={12} md={6} lg={4} xl={3}>
15+
<Box>
16+
<Skeleton variant="rectangular" height={120} />
17+
<Skeleton variant="text" width={60} />
18+
</Box>
19+
</Grid>
20+
);
21+
})}
22+
</Grid>
23+
</Grid>
1824
</Grid>
19-
</>
25+
</Container>
2026
);
2127
};
2228

src/components/MainCategories/MainCategories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface MainCategoriesProps {
1616
}
1717
const MainCategories: FC<MainCategoriesProps> = ({ items }) => {
1818
return (
19-
<Grid container spacing={2} justifyContent="center">
19+
<Grid container spacing={2}>
2020
{items.map((item) => {
2121
const params = new URLSearchParams();
2222
params.set('categoryId', item.id.toString());

0 commit comments

Comments
 (0)