Skip to content
Closed
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/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const App = () => {

useEffect(() => {
initGA();
if (parsedAuth.accessToken) checkSession();
if (parsedAuth && parsedAuth.accessToken) checkSession();
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { cls } from "@/utils/cls";
import Indicator from "@/components/Indicator";
import { trackEvent } from "@/libs/analytics";
import Indicator from "@/components/Indicator";

interface BannerImage {
sm: string;
Expand Down
6 changes: 3 additions & 3 deletions 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]">
<header className="fixed z-50 w-full bg-white lg:w-[500px]">
{isHomepage ? (
<MainHeader isLoggedIn={isLoggedIn} />
) : (
Expand All @@ -33,9 +33,9 @@ const Header = ({
showShareIcon={showShareIcon}
/>
)}
</div>
</header>

<div className="pt-14">{children}</div>
{children && <div className="pt-14">{children}</div>}
</>
);
};
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
16 changes: 6 additions & 10 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@ 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;
}
padding-top: 56px;
background-color: white;
font-size: 14px;
width: 100vh;
max-width: 500px;

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

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const Chat = () => {
};

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

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

return (
<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
8 changes: 4 additions & 4 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ const Home = () => {
}, [isLoggedIn]);

return (
<div className="flex w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
<>
<Header />
<main>
<main className="mt-14">
<section aria-label="콘텐츠 배너">
<Banner />
</section>
<section className="mt-5 w-full" aria-label="빠른 대화">
<div className="w-full px-[20px] py-[13px]">
<SubTitle mode="빠른대화" />
</div>
<div className="px-5 py-3">
<div className="flex justify-center px-5 py-3">
<ChatStartButton mode={"go-fast"} />
</div>
</section>
Expand All @@ -64,7 +64,7 @@ const Home = () => {
</div>
</section>
</main>
</div>
</>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/pages/MbtiTestQuestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MbtiTestQuestions = () => {
const content: content = TEST_QNA[Number(currentPage) - 1];

return (
<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
2 changes: 1 addition & 1 deletion src/pages/MbtiTestResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const MbtiTestResult = () => {
if (!result) return <div>404 error occured</div>;

return (
<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 w-full 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 @@ -227,7 +227,7 @@ const SelectInfo = () => {
};

return (
<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