Skip to content
Merged
28 changes: 0 additions & 28 deletions public/icon/Logo.svg

This file was deleted.

10 changes: 5 additions & 5 deletions public/icon/PickCha2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions public/icon/PickCha3.svg

This file was deleted.

9 changes: 0 additions & 9 deletions public/icon/PickCha4.svg

This file was deleted.

9 changes: 0 additions & 9 deletions public/icon/PickCha5.svg

This file was deleted.

6 changes: 3 additions & 3 deletions src/app/(auth)/signin/(components)/SigninForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
)}
>
<div className='flex flex-col gap-[30px] md:gap-10'>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signin/(components)/SignupCTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Link from 'next/link';
/** 회원가입 유도 문구 */
const SignupCTA = () => {
return (
<div className='text-gray-6e6e82 my-5 text-center'>
<div className='text-gray-6e6e82 my-5 px-5 text-center'>
<p>
아직 회원이 아니신가요?{' '}
<Link href='/signup' className='underline'>
Expand Down
2 changes: 2 additions & 0 deletions src/app/(auth)/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import React from 'react';

import BicLogo from '@/components/common/BigLogo';
import { cn } from '@/lib/utils';

import SigninForm from './(components)/SigninForm';
Expand All @@ -12,6 +13,7 @@ import SnsSignin from './(components)/SnsSignin';
const SigninPage = () => {
return (
<>
<BicLogo />
<SigninForm />
<SignupCTA />
<hr
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/signup/(components)/SignupForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
)}
>
Expand Down
9 changes: 8 additions & 1 deletion src/app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from 'react';

import BicLogo from '@/components/common/BigLogo';

import SignupForm from './(components)/SignupForm';

/** 회원가입 페이지(컴포넌트 분리 버전) */
const SignupPage = () => {
return <SignupForm />;
return (
<>
<BicLogo />
<SignupForm />
</>
);
};

export default SignupPage;
5 changes: 2 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -20,8 +19,8 @@ export const metadata: Metadata = {

export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
return (
<html lang='ko' className={'theme'}>
<body className={cn(pretendard.variable, 'flex min-h-screen flex-col')}>
<html lang='ko'>
<body className={pretendard.variable}>
<SessionProvider>
<GlobalNav />
<main className='flex-1'>{children}</main>
Expand Down
61 changes: 41 additions & 20 deletions src/app/oauth/(components)/NicknameForm.tsx
Original file line number Diff line number Diff line change
@@ -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> | void;
Expand All @@ -21,29 +22,49 @@ export const NicknameForm = ({ onSubmit, isBusy, errorMessage }: Props) => {
const {
register,
handleSubmit,
formState: { errors, isSubmitting },
formState: { errors },
} = useForm<OauthSignupValues>({
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 (
<form onSubmit={handleSubmit(onSubmit)} className='flex flex-col gap-10 space-y-5'>
<Input
type='text'
label='닉네임'
placeholder='닉네임을 입력해 주세요'
errorMessage={errors.nickname?.message}
{...register('nickname')}
hintMessage='최대 10자 가능'
maxLength={10}
/>
<div>
<Button type='submit' className='shrink-0' disabled={isSubmitting || isBusy}>
{isSubmitting || isBusy ? '가입 중...' : '가입하기'}
</Button>
{errorMessage && toast.error(errorMessage)}
</div>
</form>
<div>
<BicLogo />
<form onSubmit={handleSubmit(handleFormSubmit)} className='flex flex-col gap-10 px-5'>
<Input
type='text'
label='닉네임'
placeholder='닉네임을 입력해 주세요'
errorMessage={errors.nickname?.message}
{...register('nickname')}
hintMessage='최대 10자 가능'
maxLength={10}
/>
<div>
<Button type='submit' className='shrink-0' disabled={isLoading || isBusy}>
{isLoading || isBusy ? '가입 중...' : '가입하기'}
</Button>
</div>
</form>
</div>
);
};
3 changes: 1 addition & 2 deletions src/app/oauth/kakao/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ const OauthSignupPage = () => {
<div
className={cn(
'm-auto flex flex-col',
'h-screen',
'h-screen pt-5',
'w-[335px] md:w-[440px] xl:w-[640px]',
'py-[30px] md:py-[181px] xl:py-[93px]',
'gap-[60px]',
)}
>
Expand Down
9 changes: 0 additions & 9 deletions src/assets/icon/Exclude.svg

This file was deleted.

Loading