Skip to content

Commit

Permalink
Merge pull request #238 from imi21123/test
Browse files Browse the repository at this point in the history
Feat: Login handle 추가
  • Loading branch information
imi21123 authored Mar 7, 2024
2 parents c588379 + a3c8851 commit f432a13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ NODE_PATH=src/
REACT_APP_API_ROOT=http://localhost:8080
REACT_APP_HOME_URL=http://localhost:3000
REACT_APP_KAKAO_LOGIN=http://localhost:8080/oauth2/authorization/kakao
REACT_APP_APPLE_LOGIN=http://localhost:8080/oauth2/authorization/apple
REACT_APP_GOOGLE_LOGIN=http://localhost:8080/oauth2/authorization/google
REACT_API_DOMAIN=localhost
REACT_APP_TOSS_CLIENT_KEY=test_ck_pP2YxJ4K87By0b4RZeo0rRGZwXLO
18 changes: 16 additions & 2 deletions src/pages/LoginPage/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { IMAGES } from "../../constants/images";
import React from "react";

function Login() {
const handleGoogleLogin = () => {
window.location.href = `${process.env.REACT_APP_GOOGLE_LOGIN}`;
};
const handleAppleLogin = () => {
window.location.href = `${process.env.REACT_APP_APPLE_LOGIN}`;
};
const handleKakaoLogin = () => {
window.location.href = `${process.env.REACT_APP_KAKAO_LOGIN}`;
};
Expand Down Expand Up @@ -33,8 +39,16 @@ function Login() {
<div className="login_content">
준비는 빠르게 혜택은 다르게
<div className="login_btn">
<img src={IMAGES.googleLogin} alt="googleLogin" />
<img src={IMAGES.appleLogin} alt="appleLogin" />
<img
src={IMAGES.googleLogin}
alt="googleLogin"
onClick={handleGoogleLogin}
/>
<img
src={IMAGES.appleLogin}
alt="appleLogin"
onClick={handleAppleLogin}
/>
<img
src={IMAGES.kakaoLogin}
alt="kakaoLogin"
Expand Down

0 comments on commit f432a13

Please sign in to comment.