Skip to content

Commit 24b1d0a

Browse files
committed
fix: w-[360px] w-[375px]와 같이 500px이하일 때 고정 px 부여하는 코드 모두 삭제
1 parent 9e512ce commit 24b1d0a

File tree

8 files changed

+28
-27
lines changed

8 files changed

+28
-27
lines changed

src/components/modal/TermsAndPrivacyModal.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ const TermsAndPrivacyModal = ({
77
closeModal
88
}: {
99
mode: "terms" | "privacy";
10-
closeModal: ()=>void;
10+
closeModal: () => void;
1111
}) => {
1212
const title = mode === "terms" ? "이용약관" : "개인정보처리방침";
13-
const description =
14-
mode === "terms"
15-
? TERMS
16-
: PRIVACY;
13+
const description = mode === "terms" ? TERMS : PRIVACY;
1714

18-
const handleOuterClick = () => {
19-
closeModal()
20-
}
15+
const handleOuterClick = () => {
16+
closeModal();
17+
};
2118

22-
const handleInnerClick = (e:MouseEvent) => {
23-
e.stopPropagation();
24-
}
19+
const handleInnerClick = (e: MouseEvent) => {
20+
e.stopPropagation();
21+
};
2522

2623
return (
27-
<div className="inset-0 fixed flex items-center justify-center z-50 bg-black/50" onClick={handleOuterClick}>
28-
<div className="relative rounded-lg flex flex-col items-center w-[360px] h-[476px] bg-white px-[45px] py-[25px] overflow-scroll " onClick={handleInnerClick}>
29-
<h1 className="font-bold text-2xl ">{title}</h1>
30-
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
31-
<button
32-
onClick={closeModal}
33-
className="absolute top-6 right-4"
24+
<div
25+
className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
26+
onClick={handleOuterClick}
27+
>
28+
<div
29+
className="relative flex h-[476px] w-[360px] flex-col items-center overflow-scroll rounded-lg bg-white px-[45px] py-[25px] "
30+
onClick={handleInnerClick}
3431
>
35-
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
36-
</button>
37-
</div>
32+
<h1 className="text-2xl font-bold ">{title}</h1>
33+
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
34+
<button onClick={closeModal} className="absolute top-6 right-4">
35+
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
36+
</button>
37+
</div>
3838
</div>
3939
);
4040
};

src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ body {
2929
}
3030

3131
main {
32+
padding-top: 56px;
3233
background-color: white;
3334
font-size: 14px;
3435
width: 100vh;

src/pages/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const Chat = () => {
135135
};
136136

137137
return (
138-
<div className="flex h-screen w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
138+
<div className="flex h-screen w-full flex-col bg-white lg:w-[500px]">
139139
<Header title={chatTitle} />
140140

141141
<div className="flex-1 space-y-4 overflow-y-auto px-[20px] pt-6">

src/pages/Content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Content = () => {
3333
};
3434

3535
return (
36-
<div className="flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
36+
<div className="flex w-full flex-col bg-white lg:w-[500px]">
3737
<Header title="콘텐츠" />
3838

3939
<div className="flex flex-col gap-[36px] px-5 py-5">

src/pages/MbtiTestQuestions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const MbtiTestQuestions = () => {
2626
const content: content = TEST_QNA[Number(currentPage) - 1];
2727

2828
return (
29-
<div className="flex flex-col sm:w-[360px] md:w-[375px] lg:w-[500px]">
29+
<div className="flex w-full flex-col lg:w-[500px]">
3030
<Header title="상대방 MBTI 유추 테스트" />
3131
<main className="flex h-full flex-col items-center justify-center bg-white whitespace-pre-wrap ">
3232
<span className="text-lg font-medium text-gray-500">

src/pages/MbtiTestResult.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const MbtiTestResult = () => {
1919
if (!result) return <div>404 error occured</div>;
2020

2121
return (
22-
<div className="flex h-[1008px] flex-col sm:w-[360px] md:w-[375px] lg:w-[500px]">
22+
<div className="flex h-[1008px] w-full flex-col lg:w-[500px]">
2323
<Header title="결과" showShareIcon={false} />
2424
<main className="flex h-screen w-full flex-grow flex-col items-center bg-white px-5 py-5">
2525
<img

src/pages/MyInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const MyInfo = () => {
7272
}
7373

7474
return (
75-
<div className="relative flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
75+
<div className="relative flex w-full flex-col bg-white lg:w-[500px]">
7676
<Header title="내 정보" showShareIcon={false} />
7777

7878
<ul className="mt-[10px] flex flex-col justify-between gap-[20px]">

src/pages/SelectInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const SelectInfo = () => {
227227
};
228228

229229
return (
230-
<div className="flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
230+
<div className="flex w-full flex-col bg-white lg:w-[500px]">
231231
<Header title={headerTitle} showShareIcon={false} />
232232

233233
<div className="mx-auto w-[320px]">

0 commit comments

Comments
 (0)