Skip to content

Commit ec17581

Browse files
authored
fix: AskedPerformManage 상태 및 썸네일 버그 수정 (#431)
1 parent 7fc32c5 commit ec17581

1 file changed

Lines changed: 25 additions & 66 deletions

File tree

src/pages/myPage/AskedPerformManage.jsx

Lines changed: 25 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ const AskedPerformManage = () => {
6565
})),
6666
}));
6767

68-
setList(mappedList);
68+
// 첫번째 item 열려있도록
69+
const newList = [...mappedList];
70+
newList[0].open = true;
71+
setList(newList);
6972
} catch (error) {
7073
alert(error.response.data.error);
7174
}
@@ -77,9 +80,7 @@ const AskedPerformManage = () => {
7780
}
7881

7982
const pLargeBoldClassName = !isSmallMobile ? "p-large-bold" : "p-small-bold";
80-
const pSmallRegularClassName = !isSmallMobile
81-
? "p-small-regular"
82-
: "p-xs-regular";
83+
const pSmallRegularClassName = !isSmallMobile ? "p-small-regular" : "p-xs-regular";
8384

8485
return (
8586
<div className="asked-perform-manage">
@@ -89,18 +90,14 @@ const AskedPerformManage = () => {
8990
등록한 작품들을 관리할 수 있어요!
9091
</h4>
9192

92-
<p className={!isSmallMobile ? "p-medium-regular" : "p-xs-regular"}>
93-
공연 신청 정보
94-
</p>
93+
<p className={!isSmallMobile ? "p-medium-regular" : "p-xs-regular"}>공연 신청 정보</p>
9594
<hr />
9695
<div className=" contents">
9796
<div className=" script-info f-dir-column a-items-center j-content-between">
9897
<div className=" script-info-title f-dir-column a-items-center">
99-
<ThumbnailImg />
98+
<ThumbnailImg imagePath={productInfo.imagePath} />
10099
<div style={{ height: "12px" }}></div>
101-
<p className={pLargeBoldClassName}>
102-
{productInfo.title || "제목"}
103-
</p>
100+
<p className={pLargeBoldClassName}>{productInfo.title || "제목"}</p>
104101
<hr />
105102
<p className={!isSmallMobile ? "p-large-medium" : "p-12-bold"}>
106103
{productInfo.writer || "작가"}
@@ -114,55 +111,41 @@ const AskedPerformManage = () => {
114111
<div className="title j-content-between a-items-end">
115112
<p className={pLargeBoldClassName}>대본</p>
116113
<ScriptManageEachTopBtn disabled={!productInfo.script}>
117-
{!isSmallMobile && "대본"}{" "}
118-
{productInfo.script ? "판매 중" : "판매 중지"}
114+
{!isSmallMobile && "대본"} {productInfo.script ? "판매 중" : "판매 중지"}
119115
</ScriptManageEachTopBtn>
120116
</div>
121117
<div className="content j-content-center">
122118
<div className="sales-status-box-value f-dir-column a-items-center">
123119
<p className={pSmallRegularClassName}>
124120
{formatPrice(productInfo.scriptPrice)}
125121
</p>
126-
<p className={clsx("c-grey5", pSmallRegularClassName)}>
127-
가격
128-
</p>
122+
<p className={clsx("c-grey5", pSmallRegularClassName)}>가격</p>
129123
</div>
130124
<hr />
131125
<div className="sales-status-box-value f-dir-column a-items-center">
132-
<p className={pSmallRegularClassName}>
133-
{productInfo.scriptQuantity}
134-
</p>
135-
<p className={clsx("c-grey5", pSmallRegularClassName)}>
136-
판매 수
137-
</p>
126+
<p className={pSmallRegularClassName}>{productInfo.scriptQuantity}</p>
127+
<p className={clsx("c-grey5", pSmallRegularClassName)}>판매 수</p>
138128
</div>
139129
</div>
140130
</div>
141131
<div className="sales-status-box">
142132
<div className="title j-content-between a-items-end">
143133
<p className={pLargeBoldClassName}>공연권</p>
144-
<ScriptManageEachTopBtn disabled={!productInfo.perform}>
145-
{!isSmallMobile && "공연권"}{" "}
146-
{productInfo.perform ? "판매 중" : "판매 중지"}
134+
<ScriptManageEachTopBtn disabled={!productInfo.performance}>
135+
{!isSmallMobile && "공연권"} {productInfo.performance ? "판매 중" : "판매 중지"}
147136
</ScriptManageEachTopBtn>
148137
</div>
149138
<div className="content j-content-center">
150139
<div className="sales-status-box-value f-dir-column a-items-center">
151140
<p className={pSmallRegularClassName}>
152141
{formatPrice(productInfo.performancePrice)}
153142
</p>
154-
<p className={clsx("c-grey5", pSmallRegularClassName)}>
155-
가격
156-
</p>
143+
<p className={clsx("c-grey5", pSmallRegularClassName)}>가격</p>
157144
</div>
158145
<hr />
159146
<div className="sales-status-box-value f-dir-column a-items-center">
160-
<p className={pSmallRegularClassName}>
161-
{productInfo.performanceQuantity}
162-
</p>
163-
<p className={clsx("c-grey5", pSmallRegularClassName)}>
164-
판매 수
165-
</p>
147+
<p className={pSmallRegularClassName}>{productInfo.performanceQuantity}</p>
148+
<p className={clsx("c-grey5", pSmallRegularClassName)}>판매 수</p>
166149
</div>
167150
</div>
168151
</div>
@@ -174,16 +157,10 @@ const AskedPerformManage = () => {
174157
<div
175158
key={index}
176159
className="asked-perform-box"
177-
style={
178-
index !== item.lists.length - 1
179-
? { marginBottom: "2.685vh" }
180-
: {}
181-
}
160+
style={index !== item.lists.length - 1 ? { marginBottom: "2.685vh" } : {}}
182161
>
183162
<div className="date flex justify-between items-center">
184-
<p className={clsx("text-[#8f8f8f]", pLargeBoldClassName)}>
185-
{item.date}
186-
</p>
163+
<p className={clsx("text-[#8f8f8f]", pLargeBoldClassName)}>{item.date}</p>
187164
{item.open ? (
188165
<img
189166
className="c-pointer"
@@ -214,42 +191,24 @@ const AskedPerformManage = () => {
214191
<div className="content-inside">
215192
<p className="p-medium-bold">신청자 정보</p>
216193
<div className="user-info j-content-between">
217-
<ShortInputField
218-
value={subItem.name}
219-
readOnly={true}
220-
/>
221-
<ShortInputField
222-
value={subItem.phone}
223-
readOnly={true}
224-
/>
194+
<ShortInputField value={subItem.name} readOnly={true} />
195+
<ShortInputField value={subItem.phone} readOnly={true} />
225196
</div>
226-
<LongInputField
227-
value={subItem.address}
228-
readOnly={true}
229-
/>
197+
<LongInputField value={subItem.address} readOnly={true} />
230198
</div>
231199
<div className="content-inside">
232200
<p className="p-medium-bold">예상 공연 일자</p>
233201
<div className="date-list">
234202
{subItem.performDate.map((date, dateIndex) => (
235-
<ShortInputField
236-
key={dateIndex}
237-
value={date}
238-
readOnly={true}
239-
/>
203+
<ShortInputField key={dateIndex} value={date} readOnly={true} />
240204
))}
241205
{subItem.performDate.length < subItem.amount &&
242206
Array.from(
243207
{
244-
length:
245-
subItem.amount - subItem.performDate.length,
208+
length: subItem.amount - subItem.performDate.length,
246209
},
247210
(_, index) => (
248-
<ShortInputField
249-
key={index}
250-
value="미 입력"
251-
readOnly={true}
252-
/>
211+
<ShortInputField key={index} value="미 입력" readOnly={true} />
253212
)
254213
)}
255214
</div>

0 commit comments

Comments
 (0)