-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat:카카오 로그인 시도
- Loading branch information
Showing
16 changed files
with
92 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ node_modules | |
/dist | ||
|
||
.env | ||
.env* | ||
.env* |
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
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
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
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,39 @@ | ||
const dummyChatList = [ | ||
{ | ||
chatRoomUUID: 1, | ||
chatRoomName: "문보경", | ||
chatContent: "잘지냈어?? 그동안 뭐하고 지냄?", | ||
time: "10:30 AM", | ||
alramcount: 2, | ||
}, | ||
{ | ||
chatRoomUUID: 2, | ||
chatRoomName: "박해민", | ||
chatContent: "우리 내일 만나는거 맞나?", | ||
time: "11:15 AM", | ||
alramcount: 0, | ||
}, | ||
{ | ||
chatRoomUUID: 3, | ||
chatRoomName: "이영빈", | ||
chatContent: "넵 항상 감사드립니다...!", | ||
time: "12:45 PM", | ||
alramcount: 1, | ||
}, | ||
{ | ||
chatRoomUUID: 4, | ||
chatRoomName: "김현수", | ||
chatContent: "너 파일 나한테 보냈니??", | ||
time: "1:20 PM", | ||
alramcount: 3, | ||
}, | ||
{ | ||
chatRoomUUID: 5, | ||
chatRoomName: "오지환", | ||
chatContent: "그래 곧 만나자~! 오늘 너무 즐거웠어.", | ||
time: "2:10 PM", | ||
alramcount: 0, | ||
}, | ||
]; | ||
|
||
export default dummyChatList; |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import Layout from "../../components/Common/Layout.jsx"; | ||
import MiniLayout from "../../components/Common/miniLayout.jsx"; | ||
import kakaologin from "../../assets/images/kakaologin.png"; | ||
|
||
function KakaoLogin() { | ||
const CLIENT_ID = import.meta.env.REACT_APP_KAKAO_CLIENT_ID; // 환경변수에 CLIENT_ID 설정 | ||
const REDIRECT_URL = import.meta.env.REACT_APP_KAKAO_REDIRECT_URL; // 환경변수에 REDIRECT_URL 설정 | ||
|
||
const handleKakaoLogin = () => { | ||
|
||
const kakaoLoginUrl = `https://api.kaboo.site:8081/oauth2/authorization/kakao?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URL}&response_type=code`; | ||
window.location.href = kakaoLoginUrl; // URL로 리디렉션 | ||
}; | ||
|
||
return ( | ||
<Layout> | ||
<MiniLayout> | ||
<button | ||
style={{ border: "none", background: "none", padding: 0, margin: 0, outline: "none", width: "50%" }} | ||
onClick={handleKakaoLogin} | ||
> | ||
<img src={kakaologin} style={{ width: "80%" }} alt="Kakao Login" /> | ||
</button> | ||
</MiniLayout> | ||
</Layout> | ||
); | ||
} | ||
|
||
export default KakaoLogin; |