-
Notifications
You must be signed in to change notification settings - Fork 0
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
[48기 박동철] 로그인, 회원가입 기능 구현 (백엔드 API서버와 통신 및 DB 저장 확인.) #4
Open
Cheeze-Man
wants to merge
16
commits into
main
Choose a base branch
from
feature/Join
base: main
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 all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bb23d07
Add:Login페이지 레이아웃
Cheeze-Man 6dac0a5
Fix:git push재시도를 위한 merge및 conflict해결중
Cheeze-Man 089999d
Add:Join페이지 레이아웃
Cheeze-Man 7d4cc5f
Add:Join페이지(2개) 레이아웃
Cheeze-Man 9919bb0
Add:로그인 기능(mock데이터와 비교) 추가
Cheeze-Man 0c0958f
Add : 회원가입 기능 구현(수정 필요)
Cheeze-Man 9c464b8
Modify : Join.scss 일부 수정
Cheeze-Man 8914ef6
Modify : 유효성검사 항목 별 구분 + 유효성 검사에 따른 UI 변경 요소 추가
Cheeze-Man ec40385
Modify : 수정 요청 사항 반영하여 수정 완료.
Cheeze-Man d903115
Modify : 일부 변수명 및 클래스명 첫 알파벳 대문자 -> 소문자
Cheeze-Man cc1fd24
Modify : CSS 수정중
Cheeze-Man 378c322
Modify : Input & Button 공통 컴포넌트로 변경 후 css수정
Cheeze-Man 12d8532
Modify : 회원가입 유효성 검사 삼항연산자 -> &&연산자로 변경
Cheeze-Man b974a54
Modify : fetch함수 API주소 백엔드와 연결 및 phoneNumer 표시 방식 변경
Cheeze-Man 060e389
Modify : fetch함수 수정 및 Join.jsx -> JoinInfo.jsx 파일명 수정
Cheeze-Man dfd4886
로그인 성공(토큰 받기까지)시 useNavigate주소 /post-list로 변경
Cheeze-Man 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
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,16 @@ | ||
[ | ||
{ | ||
"email": "[email protected]", | ||
"password": "12345678", | ||
"phoneNumber": "010-4023-6890", | ||
"nickname": "박동철", | ||
"birthday": "1998-01-04" | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"password": "12345678", | ||
"phoneNumber": "010-1234-5678", | ||
"nickname": "김유저", | ||
"birthday": "2003-08-13" | ||
} | ||
] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import React from 'react'; | ||
|
||
const Button = () => { | ||
return <div>Button</div>; | ||
const Button = ({ text, onClick, className, disabled }) => { | ||
return ( | ||
<button onClick={onClick} disabled={disabled} className={className}> | ||
{text} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
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,16 @@ | ||
import React from 'react'; | ||
|
||
const Input = ({ placeholder, name, value, onChange, type, className }) => { | ||
return ( | ||
<input | ||
className={className} | ||
type={type} | ||
placeholder={placeholder} | ||
name={name} | ||
value={value} | ||
onChange={onChange} | ||
/> | ||
); | ||
}; | ||
|
||
export default Input; |
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,34 @@ | ||
import React from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
export default function BackButtonContainer() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<div className="backButtonContainer"> | ||
<button | ||
onClick={() => { | ||
navigate(-1); | ||
}} | ||
> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="40" | ||
height="40" | ||
viewBox="0 0 40 40" | ||
fill="none" | ||
> | ||
<path | ||
d="M22.5 10L12.5 20L22.5 30" | ||
stroke="black" | ||
strokeWidth="2" | ||
strokeMiterlimit="3" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
뒤로 | ||
</button> | ||
</div> | ||
); | ||
} |
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,60 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
|
||
export default function Birthday({ onBirthdayChange }) { | ||
const years = Array.from({ length: 120 }, (_, i) => (2023 - i).toString()); | ||
const months = Array.from({ length: 12 }, (_, i) => | ||
(i + 1).toString().padStart(2, '0'), | ||
); | ||
const days = Array.from({ length: 31 }, (_, i) => | ||
(i + 1).toString().padStart(2, '0'), | ||
); | ||
|
||
const [selectedYear, setSelectedYear] = useState(''); | ||
const [selectedMonth, setSelectedMonth] = useState(''); | ||
const [selectedDay, setSelectedDay] = useState(''); | ||
|
||
useEffect(() => { | ||
if (selectedYear && selectedMonth && selectedDay) { | ||
const formattedBirthday = `${selectedYear}-${selectedMonth}-${selectedDay}`; | ||
onBirthdayChange(formattedBirthday); | ||
} | ||
}, [selectedYear, selectedMonth, selectedDay]); | ||
|
||
return ( | ||
<> | ||
<select | ||
className="birthdaySelect" | ||
value={selectedYear} | ||
onChange={e => setSelectedYear(e.target.value)} | ||
> | ||
{years.map(year => ( | ||
<option key={year} value={year}> | ||
{year}년 | ||
</option> | ||
))} | ||
</select> | ||
<select | ||
className="birthdaySelect" | ||
value={selectedMonth} | ||
onChange={e => setSelectedMonth(e.target.value)} | ||
> | ||
{months.map(month => ( | ||
<option key={month} value={month}> | ||
{month}월 | ||
</option> | ||
))} | ||
</select> | ||
<select | ||
className="birthdaySelect" | ||
value={selectedDay} | ||
onChange={e => setSelectedDay(e.target.value)} | ||
> | ||
{days.map(day => ( | ||
<option key={day} value={day}> | ||
{day}일 | ||
</option> | ||
))} | ||
</select> | ||
</> | ||
); | ||
} |
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,45 @@ | ||
import React from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import BackButtonContainer from './BackButtonContainer'; | ||
import Button from '../../components/Button'; | ||
import './JoinInfo.scss'; | ||
import './JoinDone.scss'; | ||
|
||
export default function JoinDone() { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<div className="joinDone"> | ||
<BackButtonContainer /> | ||
<div className="joinSuccessContainer"> | ||
<svg | ||
className="checkMarkSvg" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="120" | ||
height="120" | ||
viewBox="0 0 120 120" | ||
fill="none" | ||
> | ||
<path | ||
d="M46.3636 58.0165L58.2645 69.9173L79.0909 49.0909" | ||
stroke="black" | ||
strokeWidth="2" | ||
strokeMiterlimit="2" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
<circle cx="60" cy="60" r="53.5455" stroke="black" strokeWidth="2" /> | ||
</svg> | ||
<div className="joinSuccessMessage"> | ||
<h1>회원 가입되었습니다!</h1> | ||
<p>이제 로그인해주세요.</p> | ||
</div> | ||
</div> | ||
<Button | ||
text="확인" | ||
onClick={() => navigate('/login')} | ||
className="loginButton" | ||
/> | ||
</div> | ||
); | ||
} |
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,76 @@ | ||
@import '../../style/variables.scss'; | ||
|
||
.joinDone { | ||
display: flex; | ||
width: 100%; | ||
height: 80vh; | ||
padding: 0px 0px 40px; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 24px; | ||
.backButtonContainer { | ||
width: 100%; | ||
display: flex; | ||
button { | ||
display: flex; | ||
height: 56px; | ||
padding: 8px 497px 8px 0px; | ||
align-items: center; | ||
flex-shrink: 0; | ||
align-self: stretch; | ||
border: none; | ||
background-color: white; | ||
font-size: 20px; | ||
line-height: 28px; | ||
cursor: pointer; | ||
} | ||
} | ||
.joinSuccessContainer { | ||
display: flex; | ||
padding-bottom: 0px; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 40px; | ||
flex: 1 0 0; | ||
align-self: stretch; | ||
margin: auto 0; | ||
.joinSuccessMessage { | ||
text-align: center; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
h1 { | ||
font-family: Apple SD Gothic Neo; | ||
font-size: 24px; | ||
font-weight: 800; | ||
} | ||
p { | ||
font-family: Apple SD Gothic Neo; | ||
font-size: 20px; | ||
} | ||
} | ||
} | ||
.checkMarkSvg { | ||
width: 136px; | ||
height: 136px; | ||
} | ||
|
||
.loginButton { | ||
width: 528px; | ||
margin: 0 auto; | ||
display: flex; | ||
height: 56px; | ||
justify-content: center; | ||
align-items: center; | ||
align-self: stretch; | ||
border-radius: 6px; | ||
background: $blue; | ||
border: 1px solid $blue; | ||
cursor: pointer; | ||
font-family: Apple SD Gothic Neo; | ||
font-size: 18px; | ||
font-weight: 800; | ||
color: white; | ||
} | ||
} |
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.
메인 경로에 로그인 컴포넌트가 들어가 있는데, 의도된 부분일까요?
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.
아 이건 그냥 npm start 시에 추가적으로 URL 타이핑하기 귀찮아서 혼자 편의상 바꿔놨던 건데 그대로 올려버렸네요...