From d52c3c68adae503562395bc6f4aae026de914f88 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 19:45:48 +0900 Subject: [PATCH 01/11] =?UTF-8?q?chore:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.tsx | 2 +- src/components/AuthHydration.tsx | 31 ------------------------------- src/store/authStore.ts | 23 ----------------------- tailwind.config.ts | 14 -------------- 4 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 src/components/AuthHydration.tsx delete mode 100644 src/store/authStore.ts delete mode 100644 tailwind.config.ts diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 41d20d92..da9d9a7f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -19,7 +19,7 @@ export const metadata: Metadata = { export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - + diff --git a/src/components/AuthHydration.tsx b/src/components/AuthHydration.tsx deleted file mode 100644 index 7199a01e..00000000 --- a/src/components/AuthHydration.tsx +++ /dev/null @@ -1,31 +0,0 @@ -'use client'; - -import { useEffect } from 'react'; - -import { useAuthStore } from '@/store/authStore'; - -import type { Session } from 'next-auth'; - -// 이 컴포넌트는 클라이언트 컴포넌트로 동작해야 합니다. -// 서버 컴포넌트에서 받은 초기 세션 데이터를 주입하는 역할. -export default function AuthHydration({ session }: { session: Session | null }) { - const setUser = useAuthStore((state) => state.setUser); - - // 컴포넌트가 마운트될 때 한 번만 실행 - useEffect(() => { - if (session?.user) { - setUser({ - id: session.user.id, - name: session.user.name, - email: session.user.email, - image: session.user.image, - // 기타 필요한 속성 (예: role) 추가 - }); - } else { - setUser(null); - } - }, [session, setUser]); - - // UI를 렌더링하지 않습니다. - return null; -} diff --git a/src/store/authStore.ts b/src/store/authStore.ts deleted file mode 100644 index 6dbae9fa..00000000 --- a/src/store/authStore.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { create } from 'zustand'; - -interface User { - id: string | undefined; - name: string | null | undefined; - email: string | null | undefined; - image: string | null | undefined; - // role: string; // 예시로 추가된 사용자 역할 : 커스텀 가능 -} - -interface AuthState { - isLoggedIn: boolean; - user: User | null; - setUser: (user: User | null) => void; - setIsLoggedIn: (status: boolean) => void; -} - -export const useAuthStore = create((set) => ({ - isLoggedIn: false, - user: null, - setUser: (user) => set({ user, isLoggedIn: !!user }), - setIsLoggedIn: (status) => set({ isLoggedIn: status }), -})); diff --git a/tailwind.config.ts b/tailwind.config.ts deleted file mode 100644 index 53692ee3..00000000 --- a/tailwind.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Config } from 'tailwindcss'; - -const config: Config = { - darkMode: ['class', '.light'], - content: [ - './src/app/**/*.{ts,tsx,mdx}', - './src/components/**/*.{ts,tsx,mdx}', - './src/pages/**/*.{ts,tsx,mdx}', - ], - theme: { extend: {} }, - plugins: [], -}; - -export default config; From c415d4a03c8ad1730bd499e1639455358710711c Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 22:34:00 +0900 Subject: [PATCH 02/11] =?UTF-8?q?add:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=20=ED=8C=A8=EB=94=A9=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(auth)/signin/(components)/SigninForm.tsx | 2 +- src/app/(auth)/signin/(components)/SignupCTA.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(auth)/signin/(components)/SigninForm.tsx b/src/app/(auth)/signin/(components)/SigninForm.tsx index f5a499b2..73fc3dd2 100644 --- a/src/app/(auth)/signin/(components)/SigninForm.tsx +++ b/src/app/(auth)/signin/(components)/SigninForm.tsx @@ -64,7 +64,7 @@ const SigninForm = () => { onSubmit={handleSubmit(onSubmit)} className={cn( 'm-auto flex h-full flex-col justify-center gap-[60px]', - 'w=[335px] pt-[108px] pb-5', + 'w=[335px] px-5 pt-[108px] pb-5', 'md:w-[440px] md:pt-[181px]', 'xl:w-[640px] xl:pt-[90px]', )} diff --git a/src/app/(auth)/signin/(components)/SignupCTA.tsx b/src/app/(auth)/signin/(components)/SignupCTA.tsx index 9f61eb77..443b7cea 100644 --- a/src/app/(auth)/signin/(components)/SignupCTA.tsx +++ b/src/app/(auth)/signin/(components)/SignupCTA.tsx @@ -7,7 +7,7 @@ import Link from 'next/link'; /** 회원가입 유도 문구 */ const SignupCTA = () => { return ( -
+

아직 회원이 아니신가요?{' '} From f192885a02d02528ba7cc1870af913191068e6d0 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 22:48:46 +0900 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20=ED=81=B0=20=EB=A1=9C=EA=B3=A0=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/BigLogo.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/components/common/BigLogo.tsx diff --git a/src/components/common/BigLogo.tsx b/src/components/common/BigLogo.tsx new file mode 100644 index 00000000..b94264ec --- /dev/null +++ b/src/components/common/BigLogo.tsx @@ -0,0 +1,11 @@ +import Logo from '@/assets/icon/PickCha2.svg'; + +const BicLogo = () => { + return ( +

+ +
+ ); +}; + +export default BicLogo; From 9fb6dfbe3e609626502343a59327835ac38db877 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 22:50:28 +0900 Subject: [PATCH 04/11] =?UTF-8?q?add:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=ED=8F=BC=EC=97=90=20=EB=A1=9C=EA=B3=A0=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(auth)/signin/(components)/SigninForm.tsx | 6 +++--- src/app/(auth)/signin/page.tsx | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(auth)/signin/(components)/SigninForm.tsx b/src/app/(auth)/signin/(components)/SigninForm.tsx index 73fc3dd2..769984ef 100644 --- a/src/app/(auth)/signin/(components)/SigninForm.tsx +++ b/src/app/(auth)/signin/(components)/SigninForm.tsx @@ -64,9 +64,9 @@ const SigninForm = () => { onSubmit={handleSubmit(onSubmit)} className={cn( 'm-auto flex h-full flex-col justify-center gap-[60px]', - 'w=[335px] px-5 pt-[108px] pb-5', - 'md:w-[440px] md:pt-[181px]', - 'xl:w-[640px] xl:pt-[90px]', + 'w=[335px] px-5 py-5', + 'md:w-[440px]', + 'xl:w-[640px]', )} >
diff --git a/src/app/(auth)/signin/page.tsx b/src/app/(auth)/signin/page.tsx index 2e09b3de..9d087d7a 100644 --- a/src/app/(auth)/signin/page.tsx +++ b/src/app/(auth)/signin/page.tsx @@ -2,6 +2,7 @@ import React from 'react'; +import BicLogo from '@/components/common/BigLogo'; import { cn } from '@/lib/utils'; import SigninForm from './(components)/SigninForm'; @@ -12,6 +13,7 @@ import SnsSignin from './(components)/SnsSignin'; const SigninPage = () => { return ( <> +
Date: Fri, 12 Sep 2025 22:54:32 +0900 Subject: [PATCH 05/11] =?UTF-8?q?add:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A1=9C=EA=B3=A0?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(auth)/signup/(components)/SignupForm.tsx | 2 +- src/app/(auth)/signup/page.tsx | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/(auth)/signup/(components)/SignupForm.tsx b/src/app/(auth)/signup/(components)/SignupForm.tsx index 6106818d..3c8a755b 100644 --- a/src/app/(auth)/signup/(components)/SignupForm.tsx +++ b/src/app/(auth)/signup/(components)/SignupForm.tsx @@ -63,7 +63,7 @@ const SignupForm = () => { 'm-auto flex flex-col justify-between md:justify-start', 'h-screen', 'w-[335px] md:w-[440px] xl:w-[640px]', - 'py-[30px] md:py-[181px] xl:py-[93px]', + 'py-5', 'md:gap-[60px]', )} > diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsx index 0f0c0b6a..f14e5299 100644 --- a/src/app/(auth)/signup/page.tsx +++ b/src/app/(auth)/signup/page.tsx @@ -1,10 +1,17 @@ import React from 'react'; +import BicLogo from '@/components/common/BigLogo'; + import SignupForm from './(components)/SignupForm'; /** 회원가입 페이지(컴포넌트 분리 버전) */ const SignupPage = () => { - return ; + return ( + <> + + + + ); }; export default SignupPage; From b19cf593e23f55c274be6db53c975e2612831c79 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 23:05:21 +0900 Subject: [PATCH 06/11] =?UTF-8?q?add:=20=EB=8B=89=EB=84=A4=EC=9E=84=20?= =?UTF-8?q?=EC=88=98=EC=A7=91=20=ED=8F=BC=20=EB=A1=9C=EA=B3=A0=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/oauth/(components)/NicknameForm.tsx | 38 ++++++++++++--------- src/app/oauth/kakao/page.tsx | 5 ++- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/app/oauth/(components)/NicknameForm.tsx b/src/app/oauth/(components)/NicknameForm.tsx index eafe1ec2..58cc41c8 100644 --- a/src/app/oauth/(components)/NicknameForm.tsx +++ b/src/app/oauth/(components)/NicknameForm.tsx @@ -6,6 +6,7 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; import { toast } from 'sonner'; +import BicLogo from '@/components/common/BigLogo'; import Input from '@/components/common/Input'; import Button from '@/components/ui/Buttons'; import { oauthSignupSchema, OauthSignupValues } from '@/lib/validations/auth'; @@ -28,22 +29,25 @@ export const NicknameForm = ({ onSubmit, isBusy, errorMessage }: Props) => { }); return ( -
- -
- - {errorMessage && toast.error(errorMessage)} -
-
+
+ +
+ +
+ + {errorMessage && toast.error(errorMessage)} +
+
+
); }; diff --git a/src/app/oauth/kakao/page.tsx b/src/app/oauth/kakao/page.tsx index 628a6ee7..f9492fba 100644 --- a/src/app/oauth/kakao/page.tsx +++ b/src/app/oauth/kakao/page.tsx @@ -15,10 +15,9 @@ const OauthSignupPage = () => { return (
From ff040f7f589c60afd0b1aff537bd0d023a5c1ce2 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 23:06:55 +0900 Subject: [PATCH 07/11] =?UTF-8?q?add:=20=ED=81=B0=20=EB=A1=9C=EA=B3=A0=20L?= =?UTF-8?q?ink=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/BigLogo.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/common/BigLogo.tsx b/src/components/common/BigLogo.tsx index b94264ec..4c3aabb6 100644 --- a/src/components/common/BigLogo.tsx +++ b/src/components/common/BigLogo.tsx @@ -1,10 +1,12 @@ +import Link from 'next/link'; + import Logo from '@/assets/icon/PickCha2.svg'; const BicLogo = () => { return ( -
+ -
+ ); }; From 02c27d983284b958ee71af7bba7eabea87c71ae8 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 23:13:41 +0900 Subject: [PATCH 08/11] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B3=A0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icon/PickCha2.svg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/assets/icon/PickCha2.svg b/src/assets/icon/PickCha2.svg index 3087ece3..172b86fe 100644 --- a/src/assets/icon/PickCha2.svg +++ b/src/assets/icon/PickCha2.svg @@ -1,9 +1,9 @@ - - + + - - + + - + From 939504d045d2a6efe963f2c8b5d9ce4c475bc3ca Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Fri, 12 Sep 2025 23:46:54 +0900 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20=EB=8B=89=EB=84=A4=EC=9E=84?= =?UTF-8?q?=EC=88=98=EC=A7=91=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B0=B0?= =?UTF-8?q?=EC=B9=98=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/oauth/(components)/NicknameForm.tsx | 4 ++-- src/app/oauth/kakao/page.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/oauth/(components)/NicknameForm.tsx b/src/app/oauth/(components)/NicknameForm.tsx index 58cc41c8..d6c6e429 100644 --- a/src/app/oauth/(components)/NicknameForm.tsx +++ b/src/app/oauth/(components)/NicknameForm.tsx @@ -29,9 +29,9 @@ export const NicknameForm = ({ onSubmit, isBusy, errorMessage }: Props) => { }); return ( -
+
-
+ { return (
Date: Fri, 12 Sep 2025 23:55:55 +0900 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20=EC=97=90=EB=9F=AC=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/oauth/(components)/NicknameForm.tsx | 31 ++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/app/oauth/(components)/NicknameForm.tsx b/src/app/oauth/(components)/NicknameForm.tsx index d6c6e429..6874eba6 100644 --- a/src/app/oauth/(components)/NicknameForm.tsx +++ b/src/app/oauth/(components)/NicknameForm.tsx @@ -1,6 +1,6 @@ 'use client'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; @@ -9,7 +9,7 @@ import { toast } from 'sonner'; import BicLogo from '@/components/common/BigLogo'; import Input from '@/components/common/Input'; import Button from '@/components/ui/Buttons'; -import { oauthSignupSchema, OauthSignupValues } from '@/lib/validations/auth'; +import { oauthSignupSchema, type OauthSignupValues } from '@/lib/validations/auth'; type Props = { onSubmit: (values: OauthSignupValues) => Promise | void; @@ -22,16 +22,34 @@ export const NicknameForm = ({ onSubmit, isBusy, errorMessage }: Props) => { const { register, handleSubmit, - formState: { errors, isSubmitting }, + formState: { errors }, } = useForm({ resolver: zodResolver(oauthSignupSchema), mode: 'onBlur', }); + const [isLoading, setIsLoading] = useState(false); + + useEffect(() => { + if (errorMessage) { + toast.error(errorMessage); + setIsLoading(false); + } + }, [errorMessage]); + + const handleFormSubmit = async (values: OauthSignupValues) => { + try { + setIsLoading(true); + await onSubmit(values); + } finally { + setIsLoading(false); + } + }; + return (
- + { maxLength={10} />
- - {errorMessage && toast.error(errorMessage)}
From c6ed8d8ad2f7f35d2a116811570dff20073005c4 Mon Sep 17 00:00:00 2001 From: Bae Min Ji Date: Sat, 13 Sep 2025 15:25:00 +0900 Subject: [PATCH 11/11] =?UTF-8?q?chore:=20=EC=95=88=EC=93=B0=EB=8A=94=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD=EC=A0=9C=20+=20?= =?UTF-8?q?=EB=A1=9C=EA=B3=A0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/icon/Logo.svg | 28 ---------------------------- public/icon/PickCha2.svg | 10 +++++----- public/icon/PickCha3.svg | 9 --------- public/icon/PickCha4.svg | 9 --------- public/icon/PickCha5.svg | 9 --------- src/assets/icon/Exclude.svg | 9 --------- src/assets/icon/MOGA.svg | 6 ------ src/assets/icon/ZOA.svg | 19 ------------------- src/assets/icon/status=github.svg | 9 --------- src/assets/icon/status=google.svg | 3 --- 10 files changed, 5 insertions(+), 106 deletions(-) delete mode 100644 public/icon/Logo.svg delete mode 100644 public/icon/PickCha3.svg delete mode 100644 public/icon/PickCha4.svg delete mode 100644 public/icon/PickCha5.svg delete mode 100644 src/assets/icon/Exclude.svg delete mode 100644 src/assets/icon/MOGA.svg delete mode 100644 src/assets/icon/ZOA.svg delete mode 100644 src/assets/icon/status=github.svg delete mode 100644 src/assets/icon/status=google.svg diff --git a/public/icon/Logo.svg b/public/icon/Logo.svg deleted file mode 100644 index fda5a52f..00000000 --- a/public/icon/Logo.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/icon/PickCha2.svg b/public/icon/PickCha2.svg index 3087ece3..172b86fe 100644 --- a/public/icon/PickCha2.svg +++ b/public/icon/PickCha2.svg @@ -1,9 +1,9 @@ - - + + - - + + - + diff --git a/public/icon/PickCha3.svg b/public/icon/PickCha3.svg deleted file mode 100644 index ade10210..00000000 --- a/public/icon/PickCha3.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/icon/PickCha4.svg b/public/icon/PickCha4.svg deleted file mode 100644 index fe4665c7..00000000 --- a/public/icon/PickCha4.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/icon/PickCha5.svg b/public/icon/PickCha5.svg deleted file mode 100644 index 16124cb4..00000000 --- a/public/icon/PickCha5.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/assets/icon/Exclude.svg b/src/assets/icon/Exclude.svg deleted file mode 100644 index e63443a0..00000000 --- a/src/assets/icon/Exclude.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/assets/icon/MOGA.svg b/src/assets/icon/MOGA.svg deleted file mode 100644 index 5d3cb071..00000000 --- a/src/assets/icon/MOGA.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/icon/ZOA.svg b/src/assets/icon/ZOA.svg deleted file mode 100644 index 7761093a..00000000 --- a/src/assets/icon/ZOA.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/icon/status=github.svg b/src/assets/icon/status=github.svg deleted file mode 100644 index 0c79c0a4..00000000 --- a/src/assets/icon/status=github.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/src/assets/icon/status=google.svg b/src/assets/icon/status=google.svg deleted file mode 100644 index 24c8a3cc..00000000 --- a/src/assets/icon/status=google.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -