Skip to content

Commit 34b92cb

Browse files
authored
feat: 마이페이지 320 responsive design 적용 (#288)
* feat: 구매한 작품, 작품 관리 페이지 320 design * feat: 구매한 작품 320 화면 개선 * feat: 공연 신청 정보 페이지 320 적용 * feat: 공연권 환불 페이지 320 적용 * feat: MainNav, Footer 320 디자인 설정 * feat: 신청된 공연 페이지 320 디자인 적용 * feat: MainVer2 480 이하에서 보여지도록 수정
1 parent ebfe1e7 commit 34b92cb

30 files changed

+465
-127
lines changed

src/components/inputField/performanceInfo/PerformInputField.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const PerformInputField = ({
1414
readOnly,
1515
}) => {
1616
const { width } = useWindowDimensions();
17+
const { isSmallMobile } = useWindowDimensions().widthConditions;
1718

1819
return (
1920
<AuthInputField
@@ -28,8 +29,11 @@ const PerformInputField = ({
2829
rightElement={rightElement}
2930
readOnly={readOnly}
3031
errorMessageCustomFlag="true"
32+
fontMode={!isSmallMobile ? "default" : "xs"}
3133
style={
32-
!(width < 768) ? { width: "39.3125rem", height: "42px" } : { width: "100%", height: "42px" }
34+
!(width < 768)
35+
? { width: "39.3125rem", height: "42px" }
36+
: { width: "100%", height: "42px" }
3337
}
3438
/>
3539
);

src/components/myPage/NullScriptContent.css

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@use "./../../styles/_responsive.scss" as r;
2+
3+
div#null-script-content {
4+
gap: 1.44rem;
5+
6+
@include r.media-small-mobile {
7+
gap: 20px;
8+
}
9+
}

src/components/myPage/NullScriptContent.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { useNavigate } from "react-router-dom";
22

33
import OnOffBtn from "../button/OnOffBtn";
44

5-
import "./NullScriptContent.css";
5+
import useWindowDimensions from "../../hooks/useWindowDimensions";
6+
7+
import "./NullScriptContent.scss";
68
import "../../styles/text.css";
79
import "../../styles/utilities.css";
810

@@ -14,18 +16,20 @@ interface NullScriptContentProps {
1416

1517
const NullScriptContent = ({ currentPage = 0 }: NullScriptContentProps) => {
1618
const navigate = useNavigate();
19+
const { isSmallMobile } = useWindowDimensions().widthConditions;
20+
1721
const getContent = (page: 0 | 1 | 2) => {
1822
switch (page) {
1923
case 0:
2024
return {
2125
message: "아직 구매한 작품이 없어요.",
22-
buttonText: "작품 둘러보러 가기",
26+
buttonText: "작품 둘러보기",
2327
navigatePath: "/list",
2428
};
2529
case 1:
2630
return {
2731
message: "아직 등록한 작품이 없어요.",
28-
buttonText: "작품 등록하러 가기",
32+
buttonText: "작품 등록하기",
2933
navigatePath: "/post",
3034
};
3135
case 2:
@@ -52,7 +56,9 @@ const NullScriptContent = ({ currentPage = 0 }: NullScriptContentProps) => {
5256
}`}
5357
id="null-script-content"
5458
>
55-
<p className="p-large-bold">{message}</p>
59+
<p className={!isSmallMobile ? "p-large-bold" : "p-small-bold"}>
60+
{message}
61+
</p>
5662
<OnOffBtn
5763
text={buttonText}
5864
onClick={() => navigate(navigatePath)}

src/components/myPage/PurchasedPerformBtn.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import "./../../styles/utilities.css";
1414
* @param {string} props.orderStatus - WAIT: 입금 확인 중, PASS: 결제 완료, REJECT: 결제 취소
1515
* @returns
1616
*/
17-
const PurchasedPerformBtn = ({ id, possibleCount = 0, orderStatus = "WAIT" }) => {
17+
const PurchasedPerformBtn = ({ id, possibleCount = 0, orderStatus = "WAIT", style }) => {
1818
const navigate = useNavigate();
1919
return (
2020
<div className="purchased-script-btn">
@@ -23,6 +23,7 @@ const PurchasedPerformBtn = ({ id, possibleCount = 0, orderStatus = "WAIT" }) =>
2323
onClick={() => {
2424
navigate(`/mypage/purchased/performance-info/${id}`);
2525
}}
26+
style={style}
2627
>
2728
{orderStatus === "PASS" ? "공연 신청 정보" : "입금 확인 중"}
2829
</Button>

src/components/myPage/PurchasedPerformPossibleInfo.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
import { useNavigate } from "react-router-dom";
2+
import useWindowDimensions from "@/hooks/useWindowDimensions";
23

34
const PurchasedPerformPossibleInfo = ({ script }) => {
45
const navigate = useNavigate();
6+
const { isSmallMobile } = useWindowDimensions().widthConditions;
57
return (
68
<div className="f-dir-column j-content-end">
7-
<p className={`p-medium-regular ${script.orderStatus === "PASS" ? "" : "c-grey4"}`}>
9+
<p
10+
className={`${!isSmallMobile ? "p-medium-regular" : "p-xs-regular"} ${
11+
script.orderStatus === "PASS" ? "" : "c-grey4"
12+
}`}
13+
>
814
공연 가능 횟수 : {script.possibleCount}
915
</p>
1016
<p
11-
className={`p-12-400 t-underline ${
17+
className={`${
18+
!isSmallMobile ? "p-12-400" : "text-[8px] font-[400] leading-[14px]"
19+
} t-underline ${
1220
script.possibleCount !== 0 && script.orderStatus === "PASS"
1321
? "c-pointer"
1422
: "c-grey4 c-default"

src/components/myPage/PurchasedScriptBtn.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import "./../../styles/utilities.css";
2020
* @param {string} props.orderStatus - WAIT: 입금 확인 중, PASS: 결제 완료, REJECT: 결제 취소
2121
* @returns
2222
*/
23-
const PurchasedScriptBtn = ({ id, title, productId, buyPerformance, orderStatus = "WAIT" }) => {
23+
const PurchasedScriptBtn = ({ id, title, productId, buyPerformance, orderStatus = "WAIT", style }) => {
2424
const navigate = useNavigate();
2525

2626
const onClickPurchasePerform = async () => {
@@ -63,12 +63,12 @@ const PurchasedScriptBtn = ({ id, title, productId, buyPerformance, orderStatus
6363
return (
6464
<div className="j-content-end purchased-script-btn">
6565
{buyPerformance !== 0 ? (
66-
<Button color="white" onClick={onClickPurchasePerform}>
66+
<Button color="white" onClick={onClickPurchasePerform} style={style}>
6767
공연권 구매
6868
</Button>
6969
) : null}
7070

71-
<Button disabled={orderStatus !== "PASS"} onClick={onClickDownloadScript}>
71+
<Button disabled={orderStatus !== "PASS"} onClick={onClickDownloadScript} style={style}>
7272
{orderStatus === "PASS" ? "대본 받기" : "입금 확인 중"}
7373
</Button>
7474
</div>

src/components/myPage/ScriptContent.jsx

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import circleInfoBtn from "../../assets/image/button/circleInfoBtn.svg";
1414
import "./ScriptContent.scss";
1515
import "./../../styles/utilities.css";
1616
import { useNavigate } from "react-router-dom";
17+
import clsx from "clsx";
1718

1819
/**
1920
* 구매한 작품 페이지, 작품 관리 페이지의 상품 란,
@@ -43,13 +44,20 @@ const ScriptContent = ({
4344
const formattedDate = `${year}. ${month}. ${day}.`;
4445

4546
const { widthConditions } = useWindowDimensions();
47+
const { isMobile, isSmallMobile } = useWindowDimensions().widthConditions;
4648

4749
const navigate = useNavigate();
4850

49-
5051
return (
5152
<div key={index} className="script-content ">
52-
<p className="date p-large-bold c-grey-8f8f8f">{formattedDate}</p>
53+
<p
54+
className={clsx(
55+
"date c-grey-8f8f8f",
56+
!isSmallMobile ? "p-large-bold" : "p-small-bold"
57+
)}
58+
>
59+
{formattedDate}
60+
</p>
5361
<hr className="border-[#caabff]"></hr>
5462
{items.map((script, idx) => (
5563
<div key={script.id}>
@@ -71,7 +79,10 @@ const ScriptContent = ({
7179
id="title"
7280
>
7381
<div className="relative">
74-
<p className="p-large-bold" id="title">
82+
<p
83+
className={!isSmallMobile ? "p-large-bold" : "p-small-bold"}
84+
id="title"
85+
>
7586
{script.title || "제목 없음"}
7687
</p>
7788
{isRoute && (
@@ -104,7 +115,10 @@ const ScriptContent = ({
104115
</div>
105116

106117
<hr className="border border-solid border-[#9E9E9E]"></hr>
107-
<p className="p-large-medium" id="author">
118+
<p
119+
className={!isSmallMobile ? "p-large-medium" : "p-12-bold"}
120+
id="author"
121+
>
108122
{currentPage === "1"
109123
? ""
110124
: !script.delete
@@ -126,8 +140,12 @@ const ScriptContent = ({
126140
type="perform"
127141
value={script.performancePrice || 0}
128142
/>
129-
<div style={{ height: "32px" }}></div>
130-
{widthConditions.isMobile && (
143+
<div
144+
style={
145+
!isSmallMobile ? { height: "32px" } : { height: "16px" }
146+
}
147+
></div>
148+
{(isMobile || isSmallMobile) && (
131149
<PurchasedPerformPossibleInfo script={script} />
132150
)}
133151
</>
@@ -141,10 +159,12 @@ const ScriptContent = ({
141159
/>
142160
)}
143161
{/* (모바일 화면) 작품 관리 페이지 상단 버튼: 심사 끝났을 경우 표시 */}
144-
{widthConditions.isMobile &&
162+
{(isMobile || isSmallMobile) &&
145163
currentPage === "1" &&
146164
script.checked === "PASS" ? (
147-
<ScriptManageTopBtn className="mobile" script={script} />
165+
<div className="relative">
166+
<ScriptManageTopBtn className="mobile" script={script} />
167+
</div>
148168
) : null}
149169
</div>
150170
<div className=" __script-content-btn">
@@ -160,10 +180,13 @@ const ScriptContent = ({
160180
productId={script.productId}
161181
buyPerformance={script.buyPerformance}
162182
orderStatus={script.orderStatus}
183+
style={
184+
isSmallMobile ? { width: "129px", height: "40px" } : {}
185+
}
163186
/>
164187
) : (
165188
<section className="j-content-between">
166-
{!widthConditions.isMobile ? (
189+
{!(isMobile || isSmallMobile) ? (
167190
<PurchasedPerformPossibleInfo script={script} />
168191
) : (
169192
<div></div>

src/components/myPage/ScriptContent.scss

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@
1515
grid-template-columns: 197px 1fr;
1616
column-gap: 23px;
1717

18+
margin-top: 2vh;
19+
padding-bottom: 20px;
20+
21+
box-sizing: border-box;
22+
border-bottom: 1px solid #caabff;
23+
1824
@include r.media-mobile {
1925
row-gap: 20px;
2026
}
21-
& {
22-
margin-top: 2vh;
23-
padding-bottom: 20px;
24-
25-
box-sizing: border-box;
26-
border-bottom: 1px solid #caabff;
27+
@include r.media-small-mobile {
28+
grid-template-columns: 120px 1fr;
29+
column-gap: 15px;
2730
}
2831
}
2932

src/components/myPage/ScriptManageBtn.jsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import { useNavigate } from "react-router-dom";
2+
import clsx from "clsx";
23

34
import Button from "../button/RoundBtn_149_48";
45

56
import "./ScriptManageBtn.scss";
7+
import useWindowDimensions from "@/hooks/useWindowDimensions";
68

79
const ReviewCompleted = {
810
REVIEW_COMPLETED: "PASS",
911
UNDER_REVIEWING: "WAIT",
1012
};
1113

12-
const ScriptManageBtn = ({ reviewCompleted, id, performSale }) => {
14+
const ScriptManageBtn = ({ reviewCompleted, id, performSale, style }) => {
1315
const navigate = useNavigate();
16+
const { isSmallMobile } = useWindowDimensions().widthConditions;
1417

1518
return (
1619
<div className="script-manage-btn">
@@ -20,13 +23,19 @@ const ScriptManageBtn = ({ reviewCompleted, id, performSale }) => {
2023
<div className="script-manage-flex">
2124
<div> </div>
2225

23-
<div className="d-flex" style={{ gap: "19px" }}>
26+
<div
27+
className={clsx(
28+
"flex",
29+
!isSmallMobile ? "gap-[19px]" : "gap-[10px]"
30+
)}
31+
>
2432
{performSale ? (
2533
<Button
2634
color="white"
2735
onClick={() => {
2836
navigate(`/mypage/scriptmanage/askedperform/${id}`);
2937
}}
38+
style={style}
3039
>
3140
신청된 공연
3241
</Button>
@@ -38,6 +47,7 @@ const ScriptManageBtn = ({ reviewCompleted, id, performSale }) => {
3847
onClick={() => {
3948
navigate(`/mypage/scriptmanage/detail/${id}`);
4049
}}
50+
style={style}
4151
>
4252
작품 관리
4353
</Button>
@@ -47,7 +57,9 @@ const ScriptManageBtn = ({ reviewCompleted, id, performSale }) => {
4757
[ReviewCompleted.UNDER_REVIEWING]: (
4858
<div className="script-manage-flex">
4959
<div> </div>
50-
<Button disabled={true}>심사 중</Button>
60+
<Button disabled={true} style={style}>
61+
심사 중
62+
</Button>
5163
</div>
5264
),
5365
}[reviewCompleted]

0 commit comments

Comments
 (0)