Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Header = ({

return (
<>
<div className="fixed z-50 w-[360px] bg-white md:w-[375px] lg:w-[500px]">
<div className="fixed z-50 w-full bg-white lg:w-[500px]">
{isHomepage ? (
<MainHeader isLoggedIn={isLoggedIn} />
) : (
Expand Down
42 changes: 21 additions & 21 deletions src/components/modal/TermsAndPrivacyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ const TermsAndPrivacyModal = ({
closeModal
}: {
mode: "terms" | "privacy";
closeModal: ()=>void;
closeModal: () => void;
}) => {
const title = mode === "terms" ? "이용약관" : "개인정보처리방침";
const description =
mode === "terms"
? TERMS
: PRIVACY;
const description = mode === "terms" ? TERMS : PRIVACY;

const handleOuterClick = () => {
closeModal()
}
const handleOuterClick = () => {
closeModal();
};

const handleInnerClick = (e:MouseEvent) => {
e.stopPropagation();
}
const handleInnerClick = (e: MouseEvent) => {
e.stopPropagation();
};

return (
<div className="inset-0 fixed flex items-center justify-center z-50 bg-black/50" onClick={handleOuterClick}>
<div className="relative rounded-lg flex flex-col items-center w-[360px] h-[476px] bg-white px-[45px] py-[25px] overflow-scroll " onClick={handleInnerClick}>
<h1 className="font-bold text-2xl ">{title}</h1>
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
<button
onClick={closeModal}
className="absolute top-6 right-4"
<div
className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
onClick={handleOuterClick}
>
<div
className="relative flex h-[476px] w-[360px] flex-col items-center overflow-scroll rounded-lg bg-white px-[45px] py-[25px] "
onClick={handleInnerClick}
>
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
</button>
</div>
<h1 className="text-2xl font-bold ">{title}</h1>
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
<button onClick={closeModal} className="absolute top-6 right-4">
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
</button>
</div>
</div>
);
};
Expand Down
15 changes: 5 additions & 10 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,13 @@ body {
}

main {
@media screen and (min-width: 360px) {
background-color: white;
font-size: 14px;
width: 360px;
}
@media screen and (min-width: 375px) {
font-size: 16px;
width: 375px;
}
background-color: white;
font-size: 14px;
width: 100vh;
max-width: 500px;

@media screen and (min-width: 500px) {
font-size: 16px;
width: 500px;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/pages/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ const Chat = () => {
<meta property="twitter:description" content={`${mbti}와의 대화창`} />
</Helmet>

<div className="flex h-screen w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
<Header title={chatTitle} showShareIcon={false}/>
<div className="flex h-screen w-full flex-col bg-white lg:w-[500px]">
<Header title={chatTitle} showShareIcon={false} />

<div className="flex-1 space-y-4 overflow-y-auto px-[20px] pt-6">
<IntroGuide />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Content = () => {
/>
</Helmet>

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

<div className="flex flex-col gap-[36px] px-5 py-5">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Home = () => {
<meta property="twitter:description" content="홈" />
</Helmet>

<div className="flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
<div className="flex w-full flex-col bg-white lg:w-[500px]">
<Header />
<main>
<section aria-label="콘텐츠 배너">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MbtiTestQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const MbtiTestQuestions = () => {
/>
</Helmet>

<div className="flex flex-col sm:w-[360px] md:w-[375px] lg:w-[500px]">
<div className="flex w-full flex-col lg:w-[500px]">
<Header title="상대방 MBTI 유추 테스트" />
<main className="flex h-full flex-col items-center justify-center bg-white whitespace-pre-wrap ">
<span className="text-lg font-medium text-gray-500">
Expand Down
3 changes: 1 addition & 2 deletions src/pages/MbtiTestResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import RestartButton from "@/components/button/RestartButton";
import ChatStartButton from "@/components/button/ChatStartButton";
import useLayoutSize from "@/hooks/useLayoutSize";
import Header from "@/components/header/Header";
import { useParams } from "react-router-dom";

const MbtiTestResult = () => {
const { mbti } = useParams();
Expand Down Expand Up @@ -46,7 +45,7 @@ const MbtiTestResult = () => {
/>
</Helmet>

<div className="flex h-[1008px] flex-col sm:w-[360px] md:w-[375px] lg:w-[500px]">
<div className="flex h-[1008px] w-full flex-col lg:w-[500px]">
<Header title="결과" showShareIcon={false} />
<main className="flex h-screen w-full flex-grow flex-col items-center bg-white px-5 py-5">
<img
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const MyInfo = () => {
}

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

<ul className="mt-[10px] flex flex-col justify-between gap-[20px]">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SelectInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const SelectInfo = () => {
/>
</Helmet>

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

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