-
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
회원가입 및 로그인 기능 수정 #99
Merged
Merged
회원가입 및 로그인 기능 수정 #99
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8a67d1f
Feat(auth): auth contextAPI 구현
Dobbymin 4501dd1
Refactor(auth-provider): email만 상태관리 하도록 수정
Dobbymin c2f09b0
Feat(auth-provider): auth provider 적용
Dobbymin b704ab2
Feat(router): 시니또와 보호자 메인페이지 경로 상수화 구현
Dobbymin 7bd7cc1
Feat(router): 시니또와 보호자 메인페이지 경로 추가
Dobbymin a0da4f8
Fix(router): redirect 페이지 Layout 제거
Dobbymin b21f95a
Refactor: 폴더구조 변경
Dobbymin 42ac17e
Fix(redirect): token값에 페이지 이동 기능 구현 및 시니또, 보호자 페이지 이동 기능 구현
Dobbymin 772675f
Fix(register): email 가져오기 기능 구현
Dobbymin db6ab06
Feat(guard-main): 보호자 메인페이지 추가
Dobbymin 2b12233
Feat(sinitto-main): 시니또 메인페이지 추가
Dobbymin e0599c2
Refactor(senior-register): 시니어 등록 컴포넌트 분리
Diwoni 503a20c
Refactor(senior-register): react-hook-form 으로 시니어 등록 컴포넌트 분리 및 리팩토링
Diwoni f1888fb
Feat(senior-register): 시니어 조회 API 연동
Diwoni 5bab953
Feat(phone-number): 전화번호 포맷팅 hook 추가
Diwoni c0f6dff
Feat(senior-register): 시니어 추가 API 연동 및 전화번호 포맷팅 hook 수정
Diwoni 02babe2
Feat(senior-register) : 시니어 정보 수정 및 삭제 API 연동(refetch 적용)
Diwoni 151e15e
Style(senior-register): 페이지 레이아웃 조정
Diwoni 083a9f2
Style(point-log): 포인트 내역 상태에 따라 포인트 스타일 변경
Diwoni c282038
Style(signup-page): 회원가입 시 전화번호 '-' 제거해서 API 요청
Diwoni 4d2b5d1
Docs: 전화번호 포맷팅 관련 함수 파일 이동 (hooks -> utils)
Diwoni d5cacaa
Chore: 코드리뷰 반영
Diwoni 2d2613c
Merge branch 'Weekly' into Feat/issue-#97
Dobbymin 975bd5b
Fix(router): 오타 수정
Dobbymin 959e9cc
Fix: 오류나는 부분 제거
Dobbymin 13ba737
Feat(redirect): 페이지 변경 로직 수정
Dobbymin 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
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
File renamed without changes.
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 |
---|---|---|
|
@@ -21,5 +21,6 @@ export const getKakaoCallback = async ( | |
code, | ||
}, | ||
}); | ||
console.log(response.data); | ||
return response.data; | ||
}; |
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
File renamed without changes.
File renamed without changes.
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 +1,5 @@ | ||
export { default as RedirectPage } from './RedirectPage'; | ||
|
||
export * from './api'; | ||
export * from './hooks'; | ||
export * from './components'; |
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 |
---|---|---|
|
@@ -6,11 +6,13 @@ import { useRegister } from './store/hooks'; | |
import { FormValues } from './types'; | ||
import { parsePhoneNumber } from '@/shared'; | ||
import { BasicButton } from '@/shared/components'; | ||
import { useAuth } from '@/shared/provider/auth/Auth'; | ||
import { Divider } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
|
||
const RegisterPage = () => { | ||
const [userType, setUserType] = useState(''); | ||
|
||
const { | ||
register, | ||
handleSubmit, | ||
|
@@ -20,6 +22,8 @@ const RegisterPage = () => { | |
// 회원가입 처리 | ||
const mutation = useRegister(); | ||
|
||
const { email } = useAuth(); | ||
|
||
const handleUserType = (id: string) => { | ||
setUserType(id); | ||
}; | ||
|
@@ -31,7 +35,7 @@ const RegisterPage = () => { | |
const requestData = { | ||
name: data.name, | ||
phoneNumber: parsePhoneNumber(data.phoneNumber), | ||
email: '[email protected]', // 임시 (카카오 로그인 후 넘겨받기) | ||
email: email || '', | ||
isSinitto, | ||
}; | ||
console.log(requestData); | ||
|
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,3 @@ | ||
export const GuardMainPage = () => { | ||
return <div>GuardMainPage</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 @@ | ||
export { GuardMainPage } from './GuardMainPage'; |
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
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,3 @@ | ||
export const SinittoMainPage = () => { | ||
return <div>SinittoMainPage</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 @@ | ||
export { SinittoMainPage } from './SinittoMainPage'; |
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,4 +1,3 @@ | ||
export { useIntersectionObserver } from './useIntersectionObserver'; | ||
export type { UseIntersectionObserverProps } from './useIntersectionObserver'; | ||
export * from './point'; | ||
export * from './phone-number'; |
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,26 @@ | ||
import { createContext, ReactNode, useContext, useState } from 'react'; | ||
|
||
type AuthInfo = { | ||
email: string | null; | ||
setEmail: (email: string) => void; | ||
}; | ||
|
||
export const AuthContext = createContext<AuthInfo | undefined>(undefined); | ||
|
||
export const AuthProvider = ({ children }: { children: ReactNode }) => { | ||
const [email, setEmail] = useState<string | null>(null); | ||
|
||
return ( | ||
<AuthContext.Provider value={{ email, setEmail }}> | ||
{children} | ||
</AuthContext.Provider> | ||
); | ||
}; | ||
|
||
export const useAuth = () => { | ||
const context = useContext(AuthContext); | ||
if (!context) { | ||
throw new Error('useAuth는 AuthProvider 내부에서 사용되어야 합니다.'); | ||
} | ||
return context; | ||
}; |
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 @@ | ||
export { useAuth } from './Auth'; |
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 +1,2 @@ | ||
export * from './auth'; | ||
export * from './senior-info'; |
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.
여기는 일부러 카카오 로그인 이후에 들어온 데이터 확인하려고 넣으신건가욤?