-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[7주차] TherapEase 과제 제출합니다. #7
Open
Gaeun-Kwon
wants to merge
33
commits into
CEOS-Developers:master
Choose a base branch
from
TherapEase-CEOS:main
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
7f0f935
init project
flowersayo 2c4a0c5
docs: 커밋 템플릿 생성
Gaeun-Kwon 797d157
feat: 프로젝트 초기 세팅
Gaeun-Kwon da58cf2
docs: 이슈 템플릿 생성
Gaeun-Kwon 6cb4bfe
feat: 라우팅 수정
Gaeun-Kwon a954685
Merge branch 'main' of https://github.com/TherapEase-CEOS/react-vote-…
Gaeun-Kwon 0423a52
fix : add React dependency
flowersayo ca4c396
feat: Header 컴포넌트 생성 및 라우팅 변경 (#6)
Gaeun-Kwon 858cb99
feat: Layout 사이즈 설정
Gaeun-Kwon 714246d
feat: 메인페이지 레이아웃 (#8)
flowersayo 75708ab
fix: 기존 컴포넌트 조정
Gaeun-Kwon 09ff328
feat: part main page ui
Gaeun-Kwon 1c6ffcf
feat: part vote page ui
Gaeun-Kwon e5f6362
feat: part result page ui
Gaeun-Kwon df20dd3
chore: add eslintrc.json
Gaeun-Kwon 32463bb
feat: demo main page layout
flowersayo 5eb0b28
feat: demo vote page ui
flowersayo 0e3997e
feat: demo result page ui
flowersayo 17094c8
fix: 기존 컴포넌트 조정
Gaeun-Kwon 0a857ab
feat: part main page ui
Gaeun-Kwon fa1dd4d
feat: part vote page ui
Gaeun-Kwon 13a5b2d
feat: part result page ui
Gaeun-Kwon a76f3ed
Merge branch 'feature/#3-part-pages-ui' of https://github.com/TherapE…
Gaeun-Kwon 0829037
feat: 데모페이지 UI (#11)
flowersayo c3c154c
Revert "feat: 데모페이지 UI (#11)" (#13)
flowersayo b287a55
Merge branch 'develop' into release
flowersayo 2eb5b43
feat: 데모페이지 UI (#11)
flowersayo 621ee1a
add: create axios modules
flowersayo 79a5e42
add : create db.json for json API Mock Server
flowersayo 525af81
add missing commit (a76f3ed)
flowersayo 61ffe54
add: add interface
flowersayo 8ccdf49
chore : move interface.tsx
flowersayo 02c7dd4
feat: 회원가입, 로그인 화면 UI 구현 (#12)
Gaeun-Kwon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const SIGNUP_LOGIN_ERROR_MESSAGES = { | ||
userName: '*이름을 입력해주세요.', | ||
userId: '*아이디를 입력해주세요.', | ||
|
||
pw: [ | ||
'*비밀번호를 입력해주세요.', | ||
'*비밀번호: 8~16자 영문 대소문자, 숫자를 입력해주세요.', | ||
], | ||
|
||
pwCheck: [ | ||
'*비밀번호를 한 번 더 입력해주세요.', | ||
'*비밀번호가 일치하지 않습니다.', | ||
], | ||
|
||
email: ['*이메일을 입력해주세요.', '*이메일 형식을 입력해주세요.'], | ||
teamName: '*팀을 선택해주세요.', | ||
partName: '*파트를 선택해주세요.', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const TEAM_OPTIONS = [ | ||
{ label: 'TherapEase', value: 'TherapEase' }, | ||
{ label: 'RePick', value: 'RePick' }, | ||
{ label: 'BariBari', value: 'BariBari' }, | ||
{ label: 'Hooking', value: 'Hooking' }, | ||
{ label: 'Dansupport', value: 'Dansupport' }, | ||
]; | ||
|
||
export const PART_OPTIONS = [ | ||
{ label: 'FRONTEND', value: 'fe' }, | ||
{ label: 'BACKEND', value: 'be' }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,107 @@ | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import { useForm, SubmitHandler } from 'react-hook-form'; | ||
|
||
import styled from '@emotion/styled'; | ||
|
||
import { Headline } from '../../styles/Typography'; | ||
import { Button, TextField } from '@mui/material'; | ||
|
||
import { REGEX } from '../../utils/regex'; | ||
|
||
import { SIGNUP_LOGIN_ERROR_MESSAGES } from '../../constants/errorMesssages'; | ||
|
||
interface loginFormValues { | ||
userId: string; | ||
userPassword: string; | ||
} | ||
|
||
const LoginPage = () => { | ||
return <div>로그인 페이지</div>; | ||
const { | ||
register, | ||
handleSubmit, | ||
formState: { errors }, | ||
} = useForm<loginFormValues>(); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. form 관리할 때 쓸 수 있는 useForm이라는 리액트 훅이 있다는 건 처음 알았네요..! 배워갑니다 ㅎㅎ |
||
const onSubmit: SubmitHandler<loginFormValues> = (data) => { | ||
// TODO - api 연동 | ||
console.log(data); | ||
}; | ||
|
||
return ( | ||
<Wrapper> | ||
<Headline | ||
color="#ffff" | ||
style={{ width: 'calc(30% + 8rem)', textAlign: 'start' }} | ||
> | ||
로그인 | ||
</Headline> | ||
<FormWrapper onSubmit={handleSubmit(onSubmit)}> | ||
<TextField | ||
id="userId" | ||
label="아이디" | ||
helperText={errors?.userId?.message} | ||
variant="outlined" | ||
size="small" | ||
fullWidth={true} | ||
{...register('userId', { | ||
required: { | ||
value: true, | ||
message: SIGNUP_LOGIN_ERROR_MESSAGES.userId, | ||
}, | ||
})} | ||
/> | ||
<TextField | ||
id="userPassword" | ||
label="비밀번호" | ||
type="password" | ||
helperText={errors?.userPassword?.message} | ||
variant="outlined" | ||
size="small" | ||
fullWidth={true} | ||
{...register('userPassword', { | ||
required: { | ||
value: true, | ||
message: SIGNUP_LOGIN_ERROR_MESSAGES.pw[0], | ||
}, | ||
pattern: { | ||
value: REGEX.password, | ||
message: SIGNUP_LOGIN_ERROR_MESSAGES.pw[1], | ||
}, | ||
})} | ||
/> | ||
<Button | ||
type="submit" | ||
variant="contained" | ||
sx={{ width: '10rem', marginTop: '1rem' }} | ||
> | ||
로그인 | ||
</Button> | ||
</FormWrapper> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div` | ||
width: 100vw; | ||
height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: var(--ceos-blue-color); | ||
`; | ||
|
||
const FormWrapper = styled.form` | ||
width: 30%; | ||
// height: 80vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 5rem 4rem 3rem 4rem; | ||
background-color: #ffff; | ||
border-radius: 1.25rem; | ||
border: 3px solid #fff; | ||
gap: 1rem; | ||
`; | ||
|
||
export default LoginPage; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error 메시지를 정리해놓고 사용하니까 깔끔하네요!!