Skip to content

Commit 20d4385

Browse files
authored
Merge pull request #138 from Podo-Store/dev
Dev
2 parents 6bf52fe + 118b4ef commit 20d4385

File tree

7 files changed

+110
-18
lines changed

7 files changed

+110
-18
lines changed
Lines changed: 4 additions & 0 deletions
Loading
40.2 KB
Loading

src/components/file/FileInputBox.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ const FileInputBox = ({ title, infoText = "", onFileUpload, style, titleStyle })
5555

5656
return (
5757
<div className="file-input-box">
58-
<div className="title j-content-start a-items-center">
58+
<div
59+
className="title j-content-start a-items-center"
60+
style={!title ? { marginTop: "0" } : {}}
61+
>
5962
{title ? <p style={{ ...titleStyle }}>{title}</p> : null}{" "}
6063
{infoText ? (
6164
<>
@@ -70,7 +73,7 @@ const FileInputBox = ({ title, infoText = "", onFileUpload, style, titleStyle })
7073
/>
7174
{showPopup ? (
7275
<InfoPopup
73-
message={"작품 설명은 5페이지 이내의\n PDF 형식 파일만 가능해요."}
76+
message={infoText}
7477
onClose={() => {
7578
setShowPopup(!showPopup);
7679
}}

src/pages/myPage/AccountDelete/AccountDeleteSuccess.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
.delete-complete .delete-complete-box {
1313
padding: 2.69rem 1.69rem;
1414

15+
width: 100%;
16+
17+
box-sizing: border-box;
1518
border-radius: 1.25rem;
1619
border: 2px dashed var(--Main, #9591f2);
1720
}
1821

1922
.delete-complete .delete-complete-wrap img {
2023
position: absolute;
2124
top: 0;
22-
left: 0;
23-
transform: translate(-50%, -50%);
25+
left: 27px;
26+
transform: translate(0, -50%);
2427
background: #ffffff;
2528
}
2629

@@ -41,7 +44,7 @@
4144

4245
margin-top: 2.5rem;
4346

44-
width: 27rem;
47+
width: 414px;
4548
height: 3rem;
4649

4750
border: none;

src/pages/myPage/AccountInfoChange/ChangeEnter.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import EnterForm from "../../../components/EnterForm";
77

88
import { SERVER_URL } from "../../../constants/ServerURL";
99

10+
import useWindowDimensions from "@/hooks/useWindowDimensions";
11+
1012
import "./ChangeEnter.scss";
1113
import "./../../../styles/text.css";
1214

@@ -15,6 +17,10 @@ const AccountInfoChangeEnter = ({ setChangeShowPermission }) => {
1517
const [pwValid, setPwValid] = useState(false);
1618
const [showPwValid, setShowPwValid] = useState(false);
1719

20+
const {
21+
widthConditions: { isMobile },
22+
} = useWindowDimensions();
23+
1824
const onClickInputBtn = async () => {
1925
try {
2026
const response = await axios.post(
@@ -60,6 +66,7 @@ const AccountInfoChangeEnter = ({ setChangeShowPermission }) => {
6066
}}
6167
errorFlag={showPwValid && !pwValid}
6268
errorMessage="비밀번호가 일치하지 않습니다."
69+
style={isMobile ? { width: "332px" } : {}}
6370
></AuthPwInputField>
6471
<button
6572
className="p-small-bold c-white t-align-center c-pointer"

src/pages/work/PostWork.jsx

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Dialog, DialogContent } from "@mui/material";
22
import axios from "axios";
33
import Cookies from "js-cookie";
4-
import React, { useState } from "react";
4+
import React, { useEffect, useRef, useState } from "react";
55
import { useNavigate } from "react-router-dom";
66

77
import FileInputBox from "../../components/file/FileInputBox";
@@ -10,7 +10,9 @@ import PartialLoading from "@/components/loading/PartialLoading";
1010

1111
import { SERVER_URL } from "../../constants/ServerURL";
1212

13+
import infoBtn from "@/assets/image/button/circleInfoBlackBtn.svg";
1314
import postingProcess from "../../assets/image/post/postingProcess.png";
15+
import postingProcess2 from "../../assets/image/post/postingProcess2.png";
1416

1517
import "./PostWork.scss";
1618

@@ -21,6 +23,24 @@ const PostWork = () => {
2123
const [isLoading, setIsLoading] = useState(false);
2224
const [uploadSuccess, setUploadSuccess] = useState(false);
2325

26+
// Image popup
27+
const [showPopup, setShowPopup] = useState(false);
28+
const popupRef = useRef(null);
29+
30+
useEffect(() => {
31+
const handleClickOutside = (event) => {
32+
// event.target이 popupRef.current의 child가 아닐 때
33+
if (popupRef.current && !popupRef.current.contains(event.target)) {
34+
setShowPopup(false);
35+
}
36+
};
37+
document.addEventListener("mousedown", handleClickOutside);
38+
39+
return () => {
40+
document.removeEventListener("mousedown", handleClickOutside);
41+
};
42+
}, []);
43+
2444
const navigate = useNavigate();
2545

2646
const onClickUpload = async () => {
@@ -94,17 +114,21 @@ const PostWork = () => {
94114
<div className="upload-title">
95115
<h6>작품 등록 신청</h6>
96116
{/* 팝업 메뉴 */}
97-
{/*
98-
<img
99-
src={infoBtn}
100-
alt="infoBtn"
101-
onClick={(event) => {
102-
setShowPopup(true);
103-
const rect = event.target.getBoundingClientRect();
104-
setPopupPosition({ x: rect.left, y: rect.bottom });
105-
}}
106-
/>
107-
*/}
117+
118+
<div className="p-relative" style={{ height: "20px" }} ref={popupRef}>
119+
<img
120+
src={infoBtn}
121+
alt="i"
122+
onClick={(event) => {
123+
setShowPopup(!showPopup);
124+
}}
125+
/>
126+
{showPopup && (
127+
<div className="image-popup f-center">
128+
<img src={postingProcess2} alt="" />
129+
</div>
130+
)}
131+
</div>
108132
</div>
109133

110134
<FileInputBox

src/pages/work/PostWork.scss

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "./../../components/button/mixins.scss" as m;
2+
@use "./../../styles/_responsive.scss" as r;
23

34
.post-work {
45
width: 100vw;
@@ -18,6 +19,17 @@
1819

1920
.post-work .left-side {
2021
flex: 0.85;
22+
23+
@include r.media-laptop {
24+
margin-left: 90px;
25+
}
26+
@include r.media-tablet {
27+
flex: 1;
28+
margin-right: 90px;
29+
}
30+
@include r.media-mobile {
31+
margin: 0 50px;
32+
}
2133
}
2234

2335
.post-work .right-side {
@@ -26,6 +38,10 @@
2638
background-size: contain;
2739
background-repeat: no-repeat;
2840
background-position: center;
41+
42+
@include r.media-tablet {
43+
display: none;
44+
}
2945
}
3046

3147
.post-work .inside-field {
@@ -69,9 +85,44 @@
6985
line-height: 1.75rem; /* 140% */
7086
}
7187

72-
.post-work .upload-title img {
88+
.post-work .upload-title > img {
89+
display: none;
90+
7391
width: 1.75rem;
7492
cursor: pointer;
93+
@include r.media-tablet {
94+
display: block;
95+
}
96+
}
97+
98+
.post-work .upload-title .image-popup {
99+
position: absolute;
100+
top: 20px;
101+
left: 25px;
102+
z-index: 1;
103+
104+
width: 345px;
105+
height: 553px;
106+
107+
background: #f5f5f5;
108+
border: 1px solid #dadada;
109+
border-radius: 0.625rem;
110+
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
111+
112+
transform: translateY(-100%);
113+
@include r.media-mobile {
114+
width: 268px;
115+
height: 430px;
116+
}
117+
}
118+
119+
.post-work .upload-title .image-popup > img {
120+
width: 315px;
121+
height: 523px;
122+
@include r.media-mobile {
123+
width: 242px;
124+
height: 402px;
125+
}
75126
}
76127

77128
.post-work .inside-field button#upload-btn {

0 commit comments

Comments
 (0)