Skip to content

Commit 79e654e

Browse files
authored
Merge pull request #352 from Podo-Store/feat/change-terms-popup
feat: 작가 대상 이용약관 팝업 업데이트
2 parents f858d4b + ccca442 commit 79e654e

File tree

13 files changed

+1756
-180
lines changed

13 files changed

+1756
-180
lines changed

package-lock.json

Lines changed: 1521 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
"react-draggable": "^4.4.6",
2828
"react-dropzone": "^14.2.3",
2929
"react-intersection-observer": "^9.16.0",
30+
"react-markdown": "^10.1.0",
3031
"react-pdf": "^5.7.2",
3132
"react-router-dom": "^6.22.3",
3233
"react-spinners": "^0.14.1",
3334
"react-table": "^7.8.0",
3435
"recharts": "^3.0.2",
36+
"remark-gfm": "^4.0.1",
3537
"sass": "^1.83.0",
3638
"valtio": "^2.1.5",
3739
"web-vitals": "^2.1.4"
11.4 KB
Loading
-4.35 KB
Loading
-25.2 KB
Loading
-2.65 KB
Loading
-12 KB
Loading
-36.7 KB
Loading

src/components/file/FileInputBox.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,12 @@ const FileInputBox: React.FC<FileInputBoxProps> = ({
171171
</p>
172172
</div>
173173
) : (
174-
<div>
175-
<img src={download} alt="download" className="size-[40px]" />
174+
<div className="flex-col items-center ">
175+
<img
176+
src={download}
177+
alt="download"
178+
className="size-[40px] mx-auto mb-[4px]"
179+
/>
176180
<p id="pdf" className="p-small-bold">
177181
PDF
178182
</p>
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import ReactMarkdown from "react-markdown";
2+
import remarkGfm from "remark-gfm";
3+
import useWindowDimensions from "@/hooks/useWindowDimensions";
4+
import CloseBtn from "./../../assets/image/button/CloseBtn.svg";
5+
import { Dialog } from "@mui/material";
6+
import { AUTHOR_TERMS_CONTENT } from "@/constants/PopupTexts/PostWorkTexts";
7+
import OnOffBtn from "../button/OnOffBtn";
8+
9+
function DialogPopup({
10+
onClick,
11+
setShowPopup,
12+
}: {
13+
onClick: () => void;
14+
setShowPopup: (show: boolean) => void;
15+
}) {
16+
const { isMobile, isSmallMobile } = useWindowDimensions().widthConditions;
17+
18+
const handleClose = () => {
19+
setShowPopup(false);
20+
};
21+
22+
return (
23+
<Dialog
24+
open
25+
onClose={handleClose}
26+
keepMounted
27+
slotProps={{
28+
paper: {
29+
sx: {
30+
display: "flex",
31+
flexDirection: "column",
32+
alignItems: "center",
33+
margin: 0,
34+
width: isMobile ? "450px" : isSmallMobile ? "280px" : "500px",
35+
borderRadius: "30px",
36+
height: isSmallMobile ? "70vh" : "626px",
37+
maxHeight: isSmallMobile ? "493px" : "626px",
38+
overflow: "hidden",
39+
},
40+
},
41+
}}
42+
>
43+
<form
44+
onSubmit={(e) => {
45+
e.preventDefault();
46+
onClick();
47+
}}
48+
className="w-full p-[15px] sm:p-[20px] flex flex-col h-full "
49+
>
50+
<div className="flex w-full !items-center sm:justify-between mb-[10px]">
51+
<span
52+
className="flex justify-center items-center w-full sm:w-[265px] px-[15px] py-[10px] sm:px-[15px] sm:py-[10px] rounded-[30px] bg-[#F5F5F5]
53+
border border-solid [border-width:0.3px] border-neutral-300/60 p-small-regular sm:p-medium-medium whitespace-nowrap"
54+
>
55+
작가 대상 이용약관 (포도알 스테이지)
56+
</span>
57+
{!isSmallMobile && (
58+
<img
59+
className="c-pointer"
60+
id="close-btn"
61+
src={CloseBtn}
62+
alt="close"
63+
onClick={handleClose}
64+
></img>
65+
)}
66+
</div>
67+
68+
<div
69+
className="prose prose-neutral max-w-none whitespace-pre-wrap rounded-[30px] bg-[#F5F5F5] border border-solid [border-width:0.3px] border-neutral-300/60 p-[20px]
70+
flex-1 min-h-0 overflow-y-auto"
71+
>
72+
<ReactMarkdown
73+
remarkPlugins={[remarkGfm]}
74+
components={{
75+
h3: ({ node, ...props }) => (
76+
<h3 className="text-[16px] font-semibold" {...props} />
77+
),
78+
p: ({ node, ...props }) => (
79+
<p className="p-small-regular leading-6" {...props} />
80+
),
81+
ol: (props) => (
82+
<ol className="p-small-regular list-decimal pl-5" {...props} />
83+
),
84+
ul: (props) => (
85+
<ul className="p-small-regular list-disc pl-5" {...props} />
86+
),
87+
li: (props) => (
88+
<li className="p-small-regular leading-6" {...props} />
89+
),
90+
hr: (props) => (
91+
<hr className="border-t border-neutral-200" {...props} />
92+
),
93+
}}
94+
>
95+
{AUTHOR_TERMS_CONTENT}
96+
</ReactMarkdown>
97+
</div>
98+
<OnOffBtn
99+
text="동의하고 작품 보내기"
100+
onClick={onClick}
101+
disabled={false}
102+
color="purple"
103+
style={{ width: "100%", marginTop: "20px" }}
104+
/>
105+
</form>
106+
</Dialog>
107+
);
108+
}
109+
110+
export default DialogPopup;

0 commit comments

Comments
 (0)