Skip to content

Commit e9e5a4c

Browse files
authored
fix: 반응형 수정 (#265)
* feat: SideMenu에 좋아한 작품 추가 * fix: 작품 후기 작성 라우팅 방식 변경 * fix: 대본열람 반응형 적용 * chore: console 로그 정리 * fix: 후기 작성 페이지 반응형 적용 * style: 작품 후기 작성 이미지 크기 조정 * feat: 대본 열람 경고 모달 구현
1 parent 6606688 commit e9e5a4c

File tree

15 files changed

+268
-156
lines changed

15 files changed

+268
-156
lines changed

src/api/user/postListApi.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export const fetchExploreScripts = async (
5050
});
5151

5252
const { longPlay, shortPlay } = response.data;
53-
console.log(longPlay);
54-
console.log(shortPlay);
5553
return {
5654
longPlay: Array.isArray(longPlay) ? longPlay : [],
5755
shortPlay: Array.isArray(shortPlay) ? shortPlay : [],
@@ -79,7 +77,7 @@ export const getLongWorks = async (
7977
params: { page, sortType },
8078
headers,
8179
});
82-
console.log(response);
80+
8381
return response.data;
8482
} catch (error) {
8583
console.error("Error fetching long works:", error);
@@ -104,7 +102,7 @@ export const getShortWorks = async (
104102
params: { page, sortType },
105103
headers,
106104
});
107-
console.log(response);
105+
108106
return response.data;
109107
} catch (error) {
110108
console.error("Error fetchin short works:", error);

src/api/user/profile/likeApi.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ export const fetchLikedPost = async (
2525
});
2626

2727
const { longPlay, shortPlay } = response.data;
28-
console.log(longPlay);
29-
console.log(shortPlay);
3028
return {
3129
longPlay: Array.isArray(longPlay) ? longPlay : [],
3230
shortPlay: Array.isArray(shortPlay) ? shortPlay : [],
@@ -79,7 +77,6 @@ export const getLikedShortWorks = async (
7977
params: { page },
8078
headers,
8179
});
82-
console.log(response);
8380
return response.data;
8481
} catch (error) {
8582
console.error("Error fetching liked short works:", error);
@@ -104,8 +101,6 @@ export const getLikeStatus = async (
104101
const response = await api.get<boolean>(`/scripts/likeStatus/${id}`, {
105102
headers,
106103
});
107-
console.log(response.data);
108-
console.log(document.cookie);
109104

110105
return response.data; // true 또는 false
111106
} catch (error) {

src/api/user/review/reviewWriteApi.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const getProfile = async (
7373
headers,
7474
}
7575
);
76-
console.log(response.data);
76+
7777
return response.data;
7878
} catch (error) {
7979
const err = error as AxiosError;
@@ -87,14 +87,12 @@ export const getProfile = async (
8787
};
8888

8989
export interface patchReviewProps {
90-
9190
reviewId: string;
9291
rating?: number;
9392
standardType?: string;
9493
content?: string;
9594
}
9695

97-
9896
export const patchReview = async ({
9997
reviewId,
10098
rating,
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

src/components/detail/ReviewList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const ReviewList = React.memo(({ scriptId, review }: ReviewLitProps) => {
146146
{review.myself && (
147147
<button
148148
className="ml-[5px] text-[#BABABA] text-[14px] font-medium underline"
149-
onClick={() => navigate(`/list/review/${scriptId}?mode=edit`)}
149+
onClick={() => navigate(`/list/review/${scriptId}`)}
150150
>
151151
수정/삭제
152152
</button>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@use "./../../styles/_responsive.scss" as r;
2+
.headerWithBack {
3+
width: 1180px;
4+
@include r.media-tablet {
5+
width: 668px;
6+
}
7+
@include r.media-mobile {
8+
width: 430px;
9+
}
10+
}

src/components/header/HeaderWithBack.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import React from "react";
21
import GoBack from "@/components/button/GoBack";
32

3+
import "./HeaderWithBack.scss";
4+
45
interface Props {
56
backUrl: string;
67
headerTitle: string;
@@ -19,7 +20,7 @@ const HeaderWithBack = ({
1920
className,
2021
}: Props) => {
2122
return (
22-
<div className={`flex flex-col gap-[14px] ${className}`}>
23+
<div className={`flex flex-col gap-[14px] headerWithBack ${className}`}>
2324
<GoBack url={backUrl} />
2425
<div className="flex flex-col gap-[4px]">
2526
<h1 className={headerFont}>{headerTitle}</h1>

src/components/navBar/SideMenuDialog.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ const SideMenuDialog: React.FC<SideMenuDialogProps> = ({ open, onClose }) => {
125125
<h5 className="h5-regular">마이페이지</h5>
126126
<div className="div-outside" />
127127
</div>
128+
<SideDialogBtn
129+
onClick={(event: React.MouseEvent) => {
130+
navigate(event, "/mypage/liked");
131+
}}
132+
>
133+
좋아한 작품
134+
</SideDialogBtn>
135+
<div className="div-inside" />
128136
<SideDialogBtn
129137
onClick={(event: React.MouseEvent) => {
130138
navigate(event, "/mypage/purchased");
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import wargninIcon from "@/assets/image/post/ic_warning.svg";
2+
import { useEffect } from "react";
3+
4+
interface WarningModalProps {
5+
onClose: () => void;
6+
}
7+
8+
const WarningModal = ({ onClose }: WarningModalProps) => {
9+
// useEffect(() => {
10+
// document.body.style.overflow = "hidden"; // 스크롤 잠금
11+
// return () => {
12+
// document.body.style.overflow = "auto"; // 모달 닫히면 복구
13+
// };
14+
// }, []);
15+
return (
16+
<div
17+
className="box-border fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 border border-[#2A2323] rounded-[30px] bg-[var(--grey1)] pdf-warning z-10 overflow-hidden "
18+
style={{
19+
boxShadow:
20+
"0 8px 24px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2)",
21+
}}
22+
>
23+
<div className="flex flex-row items-center justify-between box-border h-[35px] w-[340px] border bg-[#2A2323] px-[19px]">
24+
<div className="flex flex-row gap-[6px] items-center ">
25+
<img
26+
src={wargninIcon}
27+
alt="경고 모달"
28+
className="w-[25px] h-[25px] object-contain"
29+
/>
30+
<span className="p-medium-medium text-[#FF5900] translate-y-[2px]">
31+
Warning
32+
</span>
33+
</div>
34+
<button onClick={onClose} className="group">
35+
<svg
36+
xmlns="http://www.w3.org/2000/svg"
37+
width="20"
38+
height="20"
39+
viewBox="0 0 20 20"
40+
fill="currentColor"
41+
className="text-[#FBFBFB] group-hover:text-[#FF5900] transition-colors duration-200"
42+
>
43+
<path d="M11.0119 10L16.1388 3.88867C16.2248 3.78711 16.1525 3.63281 16.0197 3.63281H14.4611C14.3693 3.63281 14.2814 3.67383 14.2209 3.74414L9.99234 8.78516L5.76383 3.74414C5.70523 3.67383 5.61734 3.63281 5.52359 3.63281H3.965C3.83219 3.63281 3.75992 3.78711 3.84586 3.88867L8.97281 10L3.84586 16.1113C3.82661 16.134 3.81426 16.1617 3.81028 16.1911C3.80629 16.2205 3.81084 16.2505 3.82339 16.2775C3.83593 16.3044 3.85594 16.3272 3.88104 16.3431C3.90615 16.359 3.93528 16.3674 3.965 16.3672H5.52359C5.61539 16.3672 5.70328 16.3262 5.76383 16.2559L9.99234 11.2148L14.2209 16.2559C14.2795 16.3262 14.3673 16.3672 14.4611 16.3672H16.0197C16.1525 16.3672 16.2248 16.2129 16.1388 16.1113L11.0119 10Z" />
44+
</svg>
45+
</button>
46+
</div>
47+
48+
<p className="p-small-medium text-center mt-[22px]">
49+
작품을 무단 복사하거나 <br />
50+
불법 게재 등의 방법으로 악용 시 <br />
51+
민사 및 형사 책임의 대상이 됩니다.
52+
</p>
53+
</div>
54+
);
55+
};
56+
57+
export default WarningModal;

0 commit comments

Comments
 (0)