Skip to content

Commit 8e84cd0

Browse files
committed
♻️ refactor : Modify the About and Login pages
- Fix an error where client-side execution was inconsistent with server-side rendering. - Login component image not sized correctly, fix the CSS Related issue: YJU-OKURA#128
1 parent 9089366 commit 8e84cd0

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

src/app/components/login/Login.tsx

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use client';
21
import Image from 'next/image';
32
import getGoogleLogin from '@/src/api/auth/getGoogleLogin';
43
import svgs from '@/public/svgs/login';
@@ -17,27 +16,24 @@ const Login = () => {
1716
return (
1817
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50">
1918
<div
20-
className=" bg-white rounded-lg w-[800px] h-[530px] py-10 box-border"
19+
className=" bg-white rounded-lg w-[750px] h-[530px] py-10 box-border"
2120
id="modal-container"
2221
>
2322
<div className="w-full h-full flex items-center box-border py-8">
2423
{/* LEFT */}
2524
<div className="w-3/5 h-full text-center flex flex-col justify-between ">
2625
<div>
27-
<div className="text-4xl font-semibold pt-4">
28-
미노리에서 학습을 시작하세요!
26+
<div className="text-4xl font-semibold leading-tight">
27+
미노리에서 학습을
28+
<br /> 시작하세요!
2929
</div>
30-
<div className="text-sm text-neutral-400 my-2">
30+
<div className="text-sm text-neutral-400 py-2">
3131
소셜 로그인으로 간편하게 즐길 수 있습니다.
3232
</div>
3333
</div>
34-
<Image
35-
src={svgs.login}
36-
alt="logo"
37-
width={450}
38-
height={450}
39-
className="w-full"
40-
/>
34+
<div className="w-full flex justify-center items-center">
35+
<Image src={svgs.login} alt="logo" width={370} height={370} />
36+
</div>
4137
</div>
4238
{/* RIGHT */}
4339
<div className="w-2/5 h-full flex justify-center">

src/app/page.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ const Page = () => {
2323
};
2424

2525
useEffect(() => {
26-
document.addEventListener('mousedown', handleOutsideClick);
26+
if (typeof window !== 'undefined') {
27+
document.addEventListener('mousedown', handleOutsideClick);
2728

28-
localStorage.clear();
29+
localStorage.clear();
2930

30-
return () => {
31-
document.removeEventListener('mousedown', handleOutsideClick);
32-
};
31+
return () => {
32+
document.removeEventListener('mousedown', handleOutsideClick);
33+
};
34+
}
3335
}, []);
3436
return (
3537
<main className="flex h-screen justify-center items-center">

0 commit comments

Comments
 (0)