-
Notifications
You must be signed in to change notification settings - Fork 6
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 #73 from FinalDoubleTen/FE-60--feat/NewUser/NewLog…
…in/Kakao Fe 60 feat/new user/new login/kakao
- Loading branch information
Showing
17 changed files
with
83 additions
and
35 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
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
2 changes: 1 addition & 1 deletion
2
...onents/user/useInputBox/ValidifyCheck.tsx → ...nents/Auth/AuthInputBox/ValidifyCheck.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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { KakaoIcon } from '@components/common/icons/Icons'; | ||
|
||
const KakaoLoginButton = () => { | ||
const VITE_KAKAO_LOGIN_TEST_API_KEY = import.meta.env | ||
.VITE_KAKAO_LOGIN_TEST_API_KEY; | ||
const REDIRECT_URI = `${window.location.href}/kakao`; | ||
const KAKAO_LOGIN_URL = `https://kauth.kakao.com/oauth/authorize?client_id=${VITE_KAKAO_LOGIN_TEST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; | ||
|
||
const onKakaoLoginClick = () => { | ||
window.location.href = KAKAO_LOGIN_URL; | ||
}; | ||
|
||
return ( | ||
<button | ||
onClick={onKakaoLoginClick} | ||
className="body3 mb-2 flex h-14 w-full items-center justify-center gap-2 rounded-lg bg-[#fee304] p-2 text-['#3B1E1E']"> | ||
<KakaoIcon /> | ||
카카오로 로그인 | ||
</button> | ||
); | ||
}; | ||
|
||
export default KakaoLoginButton; |
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,13 @@ | ||
import AuthInputBox from './AuthInputBox/AuthInputBox'; | ||
import AuthEmailInputBox from './AuthInputBox/AuthEmailInputBox'; | ||
import AuthPwInputBox from './AuthInputBox/AuthPwInputBox'; | ||
import ErrorMessage from './ErrorMessage'; | ||
import KakaoLoginButton from './KakaoLoginButton'; | ||
|
||
export { | ||
AuthInputBox, | ||
AuthEmailInputBox, | ||
AuthPwInputBox, | ||
ErrorMessage, | ||
KakaoLoginButton, | ||
}; |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Signup, SignupInfo } from './signup'; | ||
import Login from './login/login.page'; | ||
import { Login, LoginKakao } from './login'; | ||
|
||
export { Signup, SignupInfo, Login }; | ||
export { Signup, SignupInfo, Login, LoginKakao }; |
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,4 @@ | ||
import Login from './login.page'; | ||
import LoginKakao from './loginKakao.page'; | ||
|
||
export { Login, LoginKakao }; |
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,19 @@ | ||
import { postKakaoLogin } from '@api/auth'; | ||
import { useEffect } from 'react'; | ||
|
||
const LoginKakao = () => { | ||
const code = new URL(window.location.href).searchParams.get('code'); | ||
|
||
useEffect(() => { | ||
console.log(code); | ||
try { | ||
const res = postKakaoLogin(); | ||
} catch (err) { | ||
console.log('카카오 로그인 중 에러 발생'); | ||
} | ||
}, []); | ||
|
||
return <div>잠시만 기다려주세요</div>; | ||
}; | ||
|
||
export default LoginKakao; |
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.