Skip to content

Commit c34bbae

Browse files
authored
fix: mockData로 인한 오류 수정 및 좋아요 페이지 제한 (#173)
* fix: type error 오류 수정 * fix: mockData 주석 해제 * fix: 좋아한 작품 페이지 막아두기
1 parent 4a71eff commit c34bbae

File tree

3 files changed

+25
-306
lines changed

3 files changed

+25
-306
lines changed

src/components/myPage/MyPageMenu.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ const MyPageMenu = ({ nickname, currentPage, isFooterVisible }) => {
4040
? "select-menu-btn selected liked"
4141
: "select-menu-btn"
4242
}
43-
onClick={() => {
44-
navigate("/mypage/liked");
45-
}}
43+
// onClick={() => {
44+
// navigate("/mypage/liked");
45+
// }}
4646
>
4747
<p className="p-medium-regular">좋아한 작품</p>
4848
<img src={likedMenuImg} alt="likedMenu"></img>

src/pages/MainNav.jsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ function MainNav() {
3030

3131
return (
3232
<>
33-
{openDialog && <SideMenuDialog open={openDialog} onClose={onCloseDialog} />}
33+
{openDialog && (
34+
<SideMenuDialog open={openDialog} onClose={onCloseDialog} />
35+
)}
3436
<nav className="navbar">
3537
<ImageBtn
3638
className="hamburger-btn"
@@ -47,8 +49,17 @@ function MainNav() {
4749
navigateWithRefresh(event, "/");
4850
}}
4951
>
50-
<img className="icon" src={navLogo} alt="logo" style={{ height: "2.786vh" }} />
51-
<img src={navTitle} alt="포도상점" style={{ height: "2.593vh" }}></img>
52+
<img
53+
className="icon"
54+
src={navLogo}
55+
alt="logo"
56+
style={{ height: "2.786vh" }}
57+
/>
58+
<img
59+
src={navTitle}
60+
alt="포도상점"
61+
style={{ height: "2.593vh" }}
62+
></img>
5263
</Link>
5364
<ul className="navbar_menu">
5465
<li>
@@ -105,7 +116,7 @@ function MainNav() {
105116
src={person}
106117
alt="myPage"
107118
onClick={(event) => {
108-
navigateWithRefresh(event, "/mypage/liked");
119+
navigateWithRefresh(event, "/mypage/purchased");
109120
}}
110121
/>
111122
<button
Lines changed: 7 additions & 299 deletions
Original file line numberDiff line numberDiff line change
@@ -1,307 +1,13 @@
11
export const mockData = [
22
{
3-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
4-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
5-
writer: "검정훈",
3+
id: "1",
4+
title: "테스트",
5+
writer: "테스트",
66
imagePath: "",
77
script: true,
8-
scriptPrice: 450000,
8+
scriptPrice: 0,
99
performance: true,
10-
performancePrice: 300000,
11-
descriptionPath: "",
12-
playType: 2,
13-
checked: true,
14-
plot: "이건 사랑이야기입니다.",
15-
date: "2024-08-21T22:41:41.619016",
16-
like: 1000000000000,
17-
view: 0,
18-
// 0 : 아무것도 구매 X
19-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
20-
// 2 : 공연권만 보유
21-
buyStatus: 0,
22-
},
23-
{
24-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
25-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
26-
writer: "검정훈",
27-
imagePath: "",
28-
script: true,
29-
scriptPrice: 450000,
30-
performance: true,
31-
performancePrice: 300000,
32-
descriptionPath: "",
33-
playType: 2,
34-
checked: true,
35-
plot: "이건 사랑이야기입니다.",
36-
date: "2024-08-21T22:41:41.619016",
37-
like: 0,
38-
view: 0,
39-
// 0 : 아무것도 구매 X
40-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
41-
// 2 : 공연권만 보유
42-
buyStatus: 0,
43-
},
44-
{
45-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
46-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
47-
writer: "검정훈",
48-
imagePath: "",
49-
script: true,
50-
scriptPrice: 450000,
51-
performance: true,
52-
performancePrice: 300000,
53-
descriptionPath: "",
54-
playType: 2,
55-
checked: true,
56-
plot: "이건 사랑이야기입니다.",
57-
date: "2024-08-21T22:41:41.619016",
58-
like: 0,
59-
view: 0,
60-
// 0 : 아무것도 구매 X
61-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
62-
// 2 : 공연권만 보유
63-
buyStatus: 0,
64-
},
65-
{
66-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
67-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
68-
writer: "검정훈",
69-
imagePath: "",
70-
script: true,
71-
scriptPrice: 450000,
72-
performance: true,
73-
performancePrice: 300000,
74-
descriptionPath: "",
75-
playType: 2,
76-
checked: true,
77-
plot: "이건 사랑이야기입니다.",
78-
date: "2024-08-21T22:41:41.619016",
79-
like: 0,
80-
view: 0,
81-
// 0 : 아무것도 구매 X
82-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
83-
// 2 : 공연권만 보유
84-
buyStatus: 0,
85-
},
86-
{
87-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
88-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
89-
writer: "검정훈",
90-
imagePath: "",
91-
script: true,
92-
scriptPrice: 450000,
93-
performance: true,
94-
performancePrice: 300000,
95-
descriptionPath: "",
96-
playType: 2,
97-
checked: true,
98-
plot: "이건 사랑이야기입니다.",
99-
date: "2024-08-21T22:41:41.619016",
100-
like: 0,
101-
view: 0,
102-
// 0 : 아무것도 구매 X
103-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
104-
// 2 : 공연권만 보유
105-
buyStatus: 0,
106-
},
107-
{
108-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
109-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
110-
writer: "검정훈",
111-
imagePath: "",
112-
script: true,
113-
scriptPrice: 450000,
114-
performance: true,
115-
performancePrice: 300000,
116-
descriptionPath: "",
117-
playType: 2,
118-
checked: true,
119-
plot: "이건 사랑이야기입니다.",
120-
date: "2024-08-21T22:41:41.619016",
121-
like: 0,
122-
view: 0,
123-
// 0 : 아무것도 구매 X
124-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
125-
// 2 : 공연권만 보유
126-
buyStatus: 0,
127-
},
128-
{
129-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
130-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
131-
writer: "검정훈",
132-
imagePath: "",
133-
script: true,
134-
scriptPrice: 450000,
135-
performance: true,
136-
performancePrice: 300000,
137-
descriptionPath: "",
138-
playType: 2,
139-
checked: true,
140-
plot: "이건 사랑이야기입니다.",
141-
date: "2024-08-21T22:41:41.619016",
142-
like: 0,
143-
view: 0,
144-
// 0 : 아무것도 구매 X
145-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
146-
// 2 : 공연권만 보유
147-
buyStatus: 0,
148-
},
149-
{
150-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
151-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
152-
writer: "검정훈",
153-
imagePath: "",
154-
script: true,
155-
scriptPrice: 450000,
156-
performance: true,
157-
performancePrice: 300000,
158-
descriptionPath: "",
159-
playType: 2,
160-
checked: true,
161-
plot: "이건 사랑이야기입니다.",
162-
date: "2024-08-21T22:41:41.619016",
163-
like: 0,
164-
view: 0,
165-
// 0 : 아무것도 구매 X
166-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
167-
// 2 : 공연권만 보유
168-
buyStatus: 0,
169-
},
170-
{
171-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
172-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
173-
writer: "검정훈",
174-
imagePath: "",
175-
script: true,
176-
scriptPrice: 450000,
177-
performance: true,
178-
performancePrice: 300000,
179-
descriptionPath: "",
180-
playType: 2,
181-
checked: true,
182-
plot: "이건 사랑이야기입니다.",
183-
date: "2024-08-21T22:41:41.619016",
184-
like: 0,
185-
view: 0,
186-
// 0 : 아무것도 구매 X
187-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
188-
// 2 : 공연권만 보유
189-
buyStatus: 0,
190-
},
191-
{
192-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
193-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
194-
writer: "검정훈",
195-
imagePath: "",
196-
script: true,
197-
scriptPrice: 450000,
198-
performance: true,
199-
performancePrice: 300000,
200-
descriptionPath: "",
201-
playType: 2,
202-
checked: true,
203-
plot: "이건 사랑이야기입니다.",
204-
date: "2024-08-21T22:41:41.619016",
205-
like: 0,
206-
view: 0,
207-
// 0 : 아무것도 구매 X
208-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
209-
// 2 : 공연권만 보유
210-
buyStatus: 0,
211-
},
212-
{
213-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
214-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
215-
writer: "검정훈",
216-
imagePath: "",
217-
script: true,
218-
scriptPrice: 450000,
219-
performance: true,
220-
performancePrice: 300000,
221-
descriptionPath: "",
222-
playType: 2,
223-
checked: true,
224-
plot: "이건 사랑이야기입니다.",
225-
date: "2024-08-21T22:41:41.619016",
226-
like: 0,
227-
view: 0,
228-
// 0 : 아무것도 구매 X
229-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
230-
// 2 : 공연권만 보유
231-
buyStatus: 0,
232-
},
233-
{
234-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
235-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
236-
writer: "검정훈",
237-
imagePath: "",
238-
script: true,
239-
scriptPrice: 450000,
240-
performance: true,
241-
performancePrice: 300000,
242-
descriptionPath: "",
243-
playType: 2,
244-
checked: true,
245-
plot: "이건 사랑이야기입니다.",
246-
date: "2024-08-21T22:41:41.619016",
247-
like: 10,
248-
view: 0,
249-
// 0 : 아무것도 구매 X
250-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
251-
// 2 : 공연권만 보유
252-
buyStatus: 0,
253-
},
254-
{
255-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
256-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
257-
writer: "검정훈",
258-
imagePath: "",
259-
script: true,
260-
scriptPrice: 450000,
261-
performance: true,
262-
performancePrice: 300000,
263-
descriptionPath: "",
264-
playType: 2,
265-
checked: true,
266-
plot: "이건 사랑이야기입니다.",
267-
date: "2024-08-21T22:41:41.619016",
268-
like: 0,
269-
view: 0,
270-
// 0 : 아무것도 구매 X
271-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
272-
// 2 : 공연권만 보유
273-
buyStatus: 0,
274-
},
275-
{
276-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
277-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
278-
writer: "검정훈",
279-
imagePath: "",
280-
script: true,
281-
scriptPrice: 450000,
282-
performance: true,
283-
performancePrice: 300000,
284-
descriptionPath: "",
285-
playType: 2,
286-
checked: true,
287-
plot: "이건 사랑이야기입니다.",
288-
date: "2024-08-21T22:41:41.619016",
289-
like: 0,
290-
view: 0,
291-
// 0 : 아무것도 구매 X
292-
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
293-
// 2 : 공연권만 보유
294-
buyStatus: 0,
295-
},
296-
{
297-
id: "c56278ee-02f7-4001-a944-ca2c5321e14e",
298-
title: "새야 날개를 펼쳐 봐라 알겠냐?????",
299-
writer: "검정훈",
300-
imagePath: "",
301-
script: true,
302-
scriptPrice: 450000,
303-
performance: true,
304-
performancePrice: 300000,
10+
performancePrice: 0,
30511
descriptionPath: "",
30612
playType: 2,
30713
checked: true,
@@ -313,5 +19,7 @@ export const mockData = [
31319
// 1 : 대본 or 대본 + 공연권 (대본 권리 기간 유효 시)
31420
// 2 : 공연권만 보유
31521
buyStatus: 0,
22+
isLike: true,
31623
},
24+
31725
];

0 commit comments

Comments
 (0)