Skip to content

Commit a05f8c0

Browse files
authored
Merge pull request #177 from MBTips/feature/로그인-페이지-개발
feat: 로그인 페이지 ui 개선
2 parents ea42895 + 7a741e5 commit a05f8c0

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

public/image/login/banner.png

425 KB
Loading

public/image/login/banner_lg.png

623 KB
Loading

src/components/TermsAndPrivacy.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ const TermsAndPrivacy = ({
44
openModal: (mode: "terms" | "privacy") => void;
55
}) => {
66
return (
7-
<div className="flex items-center w-screen text-gray-900 text-sm">
7+
<div className="relative flex items-center w-full text-gray-900 text-sm">
88
<button
99
onClick={() => openModal("terms")}
10-
className="flex justify-center border-r w-full hover:font-bold"
10+
className="flex justify-center w-full hover:font-bold"
1111
>
1212
이용약관
1313
</button>
14+
<div className="absolute h-2.5 border-r left-[50%] bottom-1.5"></div>
1415
<button
1516
onClick={() => openModal("privacy")}
1617
className="w-full hover:font-bold"

src/pages/Login.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import { useState } from "react";
22
import KakaoLoginButton from "@/components/button/KakaoLoginButton";
33
import TermsAndPrivacy from "@/components/TermsAndPrivacy";
44
import TermsAndPrivacyModal from "@/components/modal/TermsAndPrivacyModal";
5+
import useLayoutSize from "@/hooks/useLayoutSize";
56

67
const Login = () => {
8+
const layoutSize = useLayoutSize();
9+
const isPC = layoutSize === "lg";
710
const [isModalOpen, setIsModalOpen] = useState<{isOpen : boolean, mode : "terms" | "privacy"}>({
811
isOpen: false,
912
mode: "terms",
@@ -16,17 +19,17 @@ const Login = () => {
1619
setIsModalOpen((state) => ({mode:state.mode, isOpen : false}));
1720
}
1821

19-
const isOpen = isModalOpen.isOpen
22+
const isOpen = isModalOpen.isOpen;
2023
const isTerms = isModalOpen.mode === "terms";
2124

2225
return (
23-
<div className="flex flex-col items-center">
26+
<main className="bg-white flex flex-col items-center h-[812px]">
2427
<img
25-
src="/image/banner_login.png"
28+
src={isPC ? "/image/login/banner_lg.png" : "/image/login/banner.png"}
2629
alt="로그인 페이지 이미지"
2730
className="w-full h-[391px]"
2831
/>
29-
<h1 className="mt-8 font-bold text-3xl text-center whitespace-pre-wrap">
32+
<h1 className="mt-12 font-bold text-3xl text-center whitespace-pre-wrap">
3033
MBTI 성향 기반
3134
<br />
3235
AI 채팅 시뮬레이션으로
@@ -39,7 +42,7 @@ const Login = () => {
3942
<div className="mt-[47px]">
4043
<KakaoLoginButton />
4144
</div>
42-
<div className="mt-[72px]">
45+
<div className="w-full mt-auto mb-1">
4346
<TermsAndPrivacy openModal={openModal} />
4447
</div>
4548
{isOpen ? (
@@ -49,7 +52,7 @@ const Login = () => {
4952
<TermsAndPrivacyModal mode="privacy" closeModal={closeModal} />
5053
)
5154
) : null}
52-
</div>
55+
</main>
5356
);
5457
};
5558

0 commit comments

Comments
 (0)