Skip to content

Commit

Permalink
feat: 로그인, 회원가입 페이지에 head 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
soulchicken committed Aug 3, 2024
1 parent 73dc4bb commit 99073ed
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 65 deletions.
50 changes: 27 additions & 23 deletions src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Button from '../components/Button';
import Input from '../components/Input';
import logo from '../assets/MGU.icon.svg';
import { useAuth } from '../contexts/AuthProvider';
import Head from '~/components/common/Head';

const Form = styled.form`
margin-left: 20px;
Expand Down Expand Up @@ -53,30 +54,33 @@ function LoginPage() {
}
}
return (
<Container>
<Img src={logo} alt="logo" />
<Form onSubmit={handleSubmit}>
<Input
type="email"
id="email"
name="email"
placeholder="이메일"
onChange={handleChange}
/>
<Input
type="password"
id="password"
name="password"
placeholder="비밀번호"
onChange={handleChange}
/>
<Button type="submit">MustGoYour맛집 로그인</Button>
</Form>
<>
<Head title="LogIn" />
<Container>
<Img src={logo} alt="logo" />
<Form onSubmit={handleSubmit}>
<Input
type="email"
id="email"
name="email"
placeholder="이메일"
onChange={handleChange}
/>
<Input
type="password"
id="password"
name="password"
placeholder="비밀번호"
onChange={handleChange}
/>
<Button type="submit">MustGoYour맛집 로그인</Button>
</Form>

<Description>
회원이 아니신가요? <Link to="/signup">회원가입 하기</Link>
</Description>
</Container>
<Description>
회원이 아니신가요? <Link to="/signup">회원가입 하기</Link>
</Description>
</Container>
</>
);
}

Expand Down
88 changes: 46 additions & 42 deletions src/pages/SignupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Button from '../components/Button';
import Input from '../components/Input';
import logo from '../assets/MGUtitle.svg';
import axios from '../libs/axios';
import Head from '~/components/common/Head';

interface DescriptionProps {
small?: boolean;
Expand Down Expand Up @@ -97,48 +98,51 @@ function SignupPage() {
}

return (
<Container>
<Img src={logo} alt="logo" />
<Description>회원가입</Description>
<Form onSubmit={handleSubmit}>
<Input
type="text"
id="name"
name="name"
placeholder="별명"
value={values.name}
onChange={handleChange}
/>
<Input
type="email"
id="email"
name="email"
placeholder="이메일"
value={values.email}
onChange={handleChange}
/>
<Input
type="password"
id="password"
name="password"
placeholder="비밀번호"
value={values.password}
onChange={handleChange}
/>
<Input
type="password"
id="passwordRepeat"
name="passwordRepeat"
placeholder="비밀번호 확인"
value={values.passwordRepeat}
onChange={handleChange}
/>
<Button type="submit">MustGoYour맛집 회원가입</Button>
<Description small>
이미 회원이신가요? <Link to="/login"> 로그인 하기</Link>
</Description>
</Form>
</Container>
<>
<Head title="SignUp" />
<Container>
<Img src={logo} alt="logo" />
<Description>회원가입</Description>
<Form onSubmit={handleSubmit}>
<Input
type="text"
id="name"
name="name"
placeholder="별명"
value={values.name}
onChange={handleChange}
/>
<Input
type="email"
id="email"
name="email"
placeholder="이메일"
value={values.email}
onChange={handleChange}
/>
<Input
type="password"
id="password"
name="password"
placeholder="비밀번호"
value={values.password}
onChange={handleChange}
/>
<Input
type="password"
id="passwordRepeat"
name="passwordRepeat"
placeholder="비밀번호 확인"
value={values.passwordRepeat}
onChange={handleChange}
/>
<Button type="submit">MustGoYour맛집 회원가입</Button>
<Description small>
이미 회원이신가요? <Link to="/login"> 로그인 하기</Link>
</Description>
</Form>
</Container>
</>
);
}

Expand Down

0 comments on commit 99073ed

Please sign in to comment.