Skip to content

Commit cffc5c8

Browse files
committed
fix: 장바구니 / 주문내역 페이지 제목 중복노출 수정 및 아이템 좌우 폭 조정
1 parent 776144d commit cffc5c8

2 files changed

Lines changed: 28 additions & 12 deletions

File tree

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { CartStatus } from "@frontend/shop/components/features";
2-
import { Divider, Typography } from "@mui/material";
2+
import { Box, Divider, Typography, useMediaQuery, useTheme } from "@mui/material";
33
import { FC, useEffect } from "react";
44

55
import { PageLayout } from "@apps/pyconkr-2026/components/layout/PageLayout";
66
import { useAppContext } from "@apps/pyconkr-2026/contexts/app_context";
77

88
export const StoreCartPage: FC = () => {
99
const { setAppContext, language } = useAppContext();
10+
const theme = useTheme();
11+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
1012
const title = language === "ko" ? "장바구니" : "Cart";
1113

1214
useEffect(() => {
@@ -20,11 +22,17 @@ export const StoreCartPage: FC = () => {
2022

2123
return (
2224
<PageLayout spacing={3}>
23-
<Typography variant="h4" sx={{ alignSelf: "flex-start", fontWeight: 700 }}>
24-
{title}
25-
</Typography>
26-
<Divider flexItem />
27-
<CartStatus />
25+
{isMobile && (
26+
<>
27+
<Typography variant="h4" sx={{ alignSelf: "flex-start", fontWeight: 700 }}>
28+
{title}
29+
</Typography>
30+
<Divider flexItem />
31+
</>
32+
)}
33+
<Box sx={{ width: "100%" }}>
34+
<CartStatus />
35+
</Box>
2836
</PageLayout>
2937
);
3038
};

apps/pyconkr-2026/src/components/pages/store/order_histories.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { UserSignInAccount, UserSignInMethod } from "@frontend/shop/components/common";
22
import { OrderList } from "@frontend/shop/components/features";
3-
import { Divider, Stack, Typography } from "@mui/material";
3+
import { Box, Divider, Stack, Typography, useMediaQuery, useTheme } from "@mui/material";
44
import { FC, useEffect } from "react";
55

66
import { PageLayout } from "@apps/pyconkr-2026/components/layout/PageLayout";
77
import { useAppContext } from "@apps/pyconkr-2026/contexts/app_context";
88

99
export const StoreOrderHistoriesPage: FC = () => {
1010
const { setAppContext, language } = useAppContext();
11+
const theme = useTheme();
12+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
1113
const title = language === "ko" ? "주문 내역" : "Order History";
1214
const noticeText =
1315
language === "ko"
@@ -26,10 +28,14 @@ export const StoreOrderHistoriesPage: FC = () => {
2628

2729
return (
2830
<PageLayout spacing={3}>
29-
<Typography variant="h4" sx={{ alignSelf: "flex-start", fontWeight: 700 }}>
30-
{title}
31-
</Typography>
32-
<Divider flexItem />
31+
{isMobile && (
32+
<>
33+
<Typography variant="h4" sx={{ alignSelf: "flex-start", fontWeight: 700 }}>
34+
{title}
35+
</Typography>
36+
<Divider flexItem />
37+
</>
38+
)}
3339
<Stack component="ul" sx={{ alignSelf: "flex-start", pl: 3, m: 0, gap: 0.5 }}>
3440
<li>
3541
<Typography variant="body2">{noticeText}</Typography>
@@ -40,7 +46,9 @@ export const StoreOrderHistoriesPage: FC = () => {
4046
</Typography>
4147
</li>
4248
</Stack>
43-
<OrderList />
49+
<Box sx={{ width: "100%" }}>
50+
<OrderList />
51+
</Box>
4452
</PageLayout>
4553
);
4654
};

0 commit comments

Comments
 (0)