-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from process/signin-process
Process/signin process
- Loading branch information
Showing
21 changed files
with
153 additions
and
42 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
}, | ||
"emailForm": { | ||
"label": "이메일 주소", | ||
"button": "시작하기" | ||
"button": "시작하기", | ||
"finishRegist": "가입 마무리하기" | ||
} | ||
} |
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
31 changes: 28 additions & 3 deletions
31
src/components/pages/Signin/hooks/useSigninWIthPasswordMutate.tsx
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
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 @@ | ||
import type { QueryKey } from '@tanstack/react-query'; | ||
|
||
export const MY_INFO_QUERY_KEY: QueryKey = ['account-my-info'] |
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,17 @@ | ||
import type { MyInfoResponseType } from '@/lib/network/types/account'; | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { GetAccountInfoApi } from '@/lib/network/account/GetAccountInfoApi'; | ||
import { MY_INFO_QUERY_KEY } from './keys/account'; | ||
|
||
export default function useGetSigninAccountInfo(options: { | ||
enabled: boolean | ||
}) { | ||
return useQuery<MyInfoResponseType>({ | ||
queryKey: MY_INFO_QUERY_KEY, | ||
queryFn: async () => { | ||
const result = await GetAccountInfoApi() | ||
return result | ||
}, | ||
...options | ||
}) | ||
} |
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,7 @@ | ||
import type { MyInfoResponseType } from '../types/account'; | ||
import api from '..' | ||
|
||
export const GetAccountInfoApi = async () => { | ||
const result = await api.get<MyInfoResponseType>('account/me').json() | ||
return result | ||
} |
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,4 +1,8 @@ | ||
export const ACCESS_TOKEN_KEY = 'access-token' | ||
export const REFRESH_TOKEN_KEY = 'refresh-token' | ||
|
||
export const SIGNIN_EMAIL_OR_PHONE = 'signin-emailOrPhone' | ||
export const SIGNIN_EMAIL_OR_PHONE = 'signin-emailOrPhone' | ||
|
||
export const SIGNIN_CURRENT_PROFILE = 'profile-current-position' | ||
|
||
export const SIGNUP_MEMBERSHIP_TIER = 'signup-membership-tier' |
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,6 @@ | ||
import { atomWithStorage } from 'jotai/utils'; | ||
import { SIGNIN_CURRENT_PROFILE } from '@/lib/network/utils'; | ||
import { JotaiSessionStorage } from './util/Storage'; | ||
|
||
// TODO: with sessionStorage | ||
export const currentProfileAtom = atomWithStorage(SIGNIN_CURRENT_PROFILE, undefined, JotaiSessionStorage<Profile | undefined>()) |
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,5 @@ | ||
import { atomWithStorage } from 'jotai/utils'; | ||
import { SIGNUP_MEMBERSHIP_TIER } from '@/lib/network/utils'; | ||
import { JotaiSessionStorage } from './util/Storage'; | ||
|
||
export const signupMembershipTier = atomWithStorage(SIGNUP_MEMBERSHIP_TIER, undefined, JotaiSessionStorage<MembershipPlanTier | undefined>()) |
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
Oops, something went wrong.