Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Recipe from "./pages/recipe/Recipe"
import RecipeDetail from "./pages/recipe/RecipeDetail"
import {AddRecipe} from "./pages/recipe/AddRecipe"
import Join from "./pages/user/Join"
import Login from "./pages/user/Login"
import RecipeRecommend from "./pages/recipe/RecipeRecommend"

function App() {
Expand All @@ -22,7 +23,8 @@ function App() {
<Route path='recommend/:userPk' element={<RecipeRecommend/>} />
<Route path=':recipePk' element={<RecipeDetail/>}/>
</Route>
<Route path="join" element={<Join />} />
<Route path="join" element={<Join/>} />
<Route path="login" element={<Login/>} />
</Route>

</Routes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
.join-container {
.container {
width: 460px;
margin: 0 auto;
}

.join-container h2 {
.title {
font-size: 30px;
font-weight: bold;
text-align: center;
margin: 0 0 16px 0;
}

.join-container p {
.description {
text-align: center;
color: #666;
margin: 0 0 32px 0;
font-size: 16px;
}

.form-label {
.formGroup {
margin: 0 0 16px 0;
}

.label {
display: block;
font-size: 15px;
margin: 0 0 8px 0;
}

.form-control {
.input {
width: 100%;
height: 48px;
padding: 0 16px;
Expand All @@ -35,20 +39,20 @@
margin-bottom: 8px;
}

.form-control:focus {
.input:focus {
border-color: #3FA2F6;
background: #fff;
outline: none;
}

.invalid-feedback {
.error {
display: block;
color: #FF3B3B;
font-size: 14px;
margin: 0 0 16px 0;
}

.btn-primary {
.button {
width: 100%;
height: 48px;
background: #3FA2F6;
Expand All @@ -61,11 +65,11 @@
margin-top: 5px;
}

.btn-primary:hover {
.button:hover {
background: #3691E0;
}

.btn-primary:disabled {
.button:disabled {
background: #A5D3FB;
cursor: not-allowed;
}
84 changes: 84 additions & 0 deletions src/assets/css/user/Login.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
.container {
width: 460px;
margin: 0 auto;
}

.title {
font-size: 30px;
font-weight: bold;
text-align: center;
margin: 0 0 30px 0;
}

.formGroup {
margin: 0 0 16px 0;
}

.label {
display: block;
font-size: 15px;
margin: 0 0 8px 0;
}

.input {
width: 100%;
height: 48px;
border: 1px solid #DDE2E5;
border-radius: 5px;
background: #F8F9FA;
font-size: 14px;
box-sizing: border-box;
margin-bottom: 8px;
padding: 0 16px;
}

.input:focus {
border-color: #3FA2F6;
background: #fff;
outline: none;
}

.errorMessage {
color: #FF3B3B;
font-size: 15px;
margin: 8px 0 16px 0;
text-align: center;
}

.button {
width: 100%;
height: 48px;
background: #3FA2F6;
border: none;
border-radius: 5px;
color: white;
font-size: 16px;
cursor: pointer;
box-sizing: border-box;
margin-top: 5px;
}

.button:hover {
background: #3691E0;
}

.button:disabled {
background: #A5D3FB;
cursor: not-allowed;
}

.joinLink {
text-align: center;
margin-top: 24px;
font-size: 15px;
color: #666;
}

.joinLink a {
color: #3FA2F6;
text-decoration: none;
}

.joinLink a:hover {
text-decoration: underline;
}
1 change: 1 addition & 0 deletions src/components/main/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Header() {
<a href="/ingredient">내 냉장고</a>
<a href="/recipe">레시피</a>
<a href="/ingredient">즐겨찾기</a>
<a href="/login">로그인</a>
</nav>
</header>
);
Expand Down
93 changes: 42 additions & 51 deletions src/components/user/JoinForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from 'react'
import { Form, Button } from 'react-bootstrap'
import { userApi } from '../../sources/api/UserAPI'
import { useNavigate } from 'react-router-dom'
import '../../assets/css/user/Join.css'
import styles from '../../assets/css/user/Join.module.css'

const JoinForm = () => {
const navigate = useNavigate()
Expand Down Expand Up @@ -116,92 +116,83 @@ const JoinForm = () => {

return (
<Form onSubmit={handleSubmit}>
<Form.Group>
<Form.Label>아이디</Form.Label>
<Form.Control
<div className={styles.formGroup}>
<label className={styles.label}>아이디</label>
<input
className={styles.input}
type="text"
name="userId"
placeholder="아이디를 입력하세요."
placeholder="아이디를 입력하세요"
value={formData.userId}
onChange={handleChange}
isInvalid={!!errors.userId}
disabled={isSubmitting}
/>
<Form.Control.Feedback type="invalid">
{errors.userId}
</Form.Control.Feedback>
</Form.Group>

<Form.Group>
<Form.Label>비밀번호</Form.Label>
<Form.Control
{errors.userId && <span className={styles.error}>{errors.userId}</span>}
</div>

<div className={styles.formGroup}>
<label className={styles.label}>비밀번호</label>
<input
className={styles.input}
type="password"
name="userPw"
placeholder="비밀번호를 입력하세요."
placeholder="비밀번호를 입력하세요"
value={formData.userPw}
onChange={handleChange}
isInvalid={!!errors.userPw}
disabled={isSubmitting}
/>
<Form.Control.Feedback type="invalid">
{errors.userPw}
</Form.Control.Feedback>
</Form.Group>

<Form.Group>
<Form.Label>비밀번호 확인</Form.Label>
<Form.Control
{errors.userPw && <span className={styles.error}>{errors.userPw}</span>}
</div>

<div className={styles.formGroup}>
<label className={styles.label}>비밀번호 확인</label>
<input
className={styles.input}
type="password"
name="userPwConfirm"
placeholder="비밀번호를 다시 입력하세요."
placeholder="비밀번호를 다시 입력하세요"
value={formData.userPwConfirm}
onChange={handleChange}
isInvalid={!!errors.userPwConfirm}
disabled={isSubmitting}
/>
<Form.Control.Feedback type="invalid">
{errors.userPwConfirm}
</Form.Control.Feedback>
</Form.Group>

<Form.Group>
<Form.Label>이메일</Form.Label>
<Form.Control
{errors.userPwConfirm && <span className={styles.error}>{errors.userPwConfirm}</span>}
</div>

<div className={styles.formGroup}>
<label className={styles.label}>이메일</label>
<input
className={styles.input}
type="email"
name="userEmail"
placeholder="example@email.com"
value={formData.userEmail}
onChange={handleChange}
isInvalid={!!errors.userEmail}
disabled={isSubmitting}
/>
<Form.Control.Feedback type="invalid">
{errors.userEmail}
</Form.Control.Feedback>
</Form.Group>

<Form.Group>
<Form.Label>닉네임</Form.Label>
<Form.Control
{errors.userEmail && <span className={styles.error}>{errors.userEmail}</span>}
</div>

<div className={styles.formGroup}>
<label className={styles.label}>닉네임</label>
<input
className={styles.input}
type="text"
name="userNickname"
placeholder="닉네임을 입력하세요."
placeholder="닉네임을 입력하세요"
value={formData.userNickname}
onChange={handleChange}
isInvalid={!!errors.userNickname}
disabled={isSubmitting}
/>
<Form.Control.Feedback type="invalid">
{errors.userNickname}
</Form.Control.Feedback>
</Form.Group>
{errors.userNickname && <span className={styles.error}>{errors.userNickname}</span>}
</div>

<Button
<button
type="submit"
className={styles.button}
disabled={isSubmitting}
>
{isSubmitting ? '처리중...' : '회원가입'}
</Button>
</button>
</Form>
)
}
Expand Down
Loading