feat: LoginPage 추가

This commit is contained in:
정기영 2024-07-19 12:56:47 +09:00
parent 1c84395807
commit 3a26a8e44d
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,52 @@
import { AuthForm, InputBox } from '../../components/AuthForm';
import { useRef } from 'react';
import { Link } from 'react-router-dom';
import styles from './LoginPage.module.css';
export default function LoginPage() {
const idRef = useRef('');
const passwordRef = useRef('');
// linkProps : ( ) props object
const linkProps = {
message: '아직 회원이 아니신가요?',
path: '/',
title: '회원가입',
};
const findPasswordPath = '/';
const handleSubmit = () => {
// TODO: POST
console.log('로그인', idRef.current.value, passwordRef.current.value);
};
return (
<div className={styles.wrapper}>
<AuthForm
submitFunction={handleSubmit}
title="로그인"
buttonText="로그인"
linkProps={linkProps}
>
<InputBox
title="ID"
id="id"
type="text"
ref={idRef}
/>
<InputBox
title="비밀번호"
type="password"
id="password"
ref={passwordRef}
>
<Link
to={findPasswordPath}
className={`${styles.textBodyStrong} ${styles.secondaryColor}`}
>
비밀번호를 잊으셨나요?
</Link>
</InputBox>
</AuthForm>
</div>
);
}

View File

@ -0,0 +1,15 @@
.wrapper {
padding-top: 120px;
max-width: 480px;
margin: 0 auto;
}
.textBodyStrong {
font-size: 16px;
line-height: 1.4;
font-weight: 700;
}
.secondaryColor {
color: var(--text-color-secondary);
}