issue # 로그인 페이지 구현 중
This commit is contained in:
@@ -4,11 +4,14 @@ import { Field, FieldError, FieldGroup, FieldLabel, FieldLegend } from '@/compon
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { useState } from 'react';
|
||||
import { useState, useCallback } from 'react';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { PageRouting } from '@/data/RoutingData';
|
||||
import * as z from 'zod';
|
||||
|
||||
export default function LoginPage() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const loginForm = useForm<z.infer<typeof LoginSchema>>({
|
||||
resolver: zodResolver(LoginSchema),
|
||||
@@ -18,6 +21,10 @@ export default function LoginPage() {
|
||||
}
|
||||
});
|
||||
|
||||
const moveToSignUpPage = useCallback(() => {
|
||||
navigate(PageRouting["SIGN_UP"].path);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="w-full h-full flex flex-col justify-center items-center">
|
||||
<Card className="w-md pl-2 pr-2">
|
||||
@@ -62,15 +69,15 @@ export default function LoginPage() {
|
||||
</Controller>
|
||||
</form>
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
<div className="flex flex-row self-end gap-[5px]">
|
||||
<CardFooter
|
||||
className="w-full flex flex-row items-end justify-center gap-[5px]"
|
||||
>
|
||||
<Button type="submit" form="form-login">
|
||||
로그인
|
||||
</Button>
|
||||
<Button>
|
||||
회원가입
|
||||
</Button>
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user