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/app/(auth)/signin/(components)/SigninForm.tsx b/src/app/(auth)/signin/(components)/SigninForm.tsx index f5a499b2..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] 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/(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 ( -
+

아직 회원이 아니신가요?{' '} 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 ( <> +


{ '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; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 943b65a6..d56bb642 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -6,7 +6,6 @@ import GlobalNav from '@/components/common/gnb/GlobalNav'; import ModalContainer from '@/components/common/ModalContainer'; import SonnerToast from '@/components/common/SonnerToast'; import FloatingButton from '@/components/ui/FloatingButton'; -import { cn } from '@/lib/utils'; import pretendard from '../lib/utils/fonts/pretendard'; @@ -20,8 +19,8 @@ export const metadata: Metadata = { export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - - + +
{children}
diff --git a/src/app/oauth/(components)/NicknameForm.tsx b/src/app/oauth/(components)/NicknameForm.tsx index eafe1ec2..6874eba6 100644 --- a/src/app/oauth/(components)/NicknameForm.tsx +++ b/src/app/oauth/(components)/NicknameForm.tsx @@ -1,14 +1,15 @@ 'use client'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; 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'; +import { oauthSignupSchema, type OauthSignupValues } from '@/lib/validations/auth'; type Props = { onSubmit: (values: OauthSignupValues) => Promise | void; @@ -21,29 +22,49 @@ 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 ( -
- -
- - {errorMessage && toast.error(errorMessage)} -
-
+
+ +
+ +
+ +
+
+
); }; diff --git a/src/app/oauth/kakao/page.tsx b/src/app/oauth/kakao/page.tsx index 628a6ee7..4ba7adb7 100644 --- a/src/app/oauth/kakao/page.tsx +++ b/src/app/oauth/kakao/page.tsx @@ -16,9 +16,8 @@ const OauthSignupPage = () => {
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/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 @@ - - + + - - + + - + 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 @@ - - - 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/components/common/BigLogo.tsx b/src/components/common/BigLogo.tsx new file mode 100644 index 00000000..4c3aabb6 --- /dev/null +++ b/src/components/common/BigLogo.tsx @@ -0,0 +1,13 @@ +import Link from 'next/link'; + +import Logo from '@/assets/icon/PickCha2.svg'; + +const BicLogo = () => { + return ( + + + + ); +}; + +export default BicLogo; 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;