diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx index 248bf0ca..c648c9b5 100644 --- a/src/pages/LoginPage.tsx +++ b/src/pages/LoginPage.tsx @@ -1,10 +1,11 @@ import { useNavigate } from "react-router-dom"; import EventeeButton from "../components/EventeeButton"; +import "../styles/login-animations.css"; const GOOGLE_CLIENT_ID = import.meta.env.VITE_GOOGLE_CLIENT_ID; const REDIRECT_URI = import.meta.env.VITE_GOOGLE_REDIRECT_URI; -const buildGoogleOAuthUrl = (target: string) => { +const buildGoogleOAuthUrl = (target) => { return ( `https://accounts.google.com/o/oauth2/v2/auth?` + `client_id=${GOOGLE_CLIENT_ID}` + @@ -20,7 +21,13 @@ const buildGoogleOAuthUrl = (target: string) => { export default function LoginPage() { const navigate = useNavigate(); - const handleGoogleLogin = () => { + const handleGoogleLogin = (e) => { + const rect = e.target.getBoundingClientRect(); + const x = e.clientX - rect.left; + const y = e.clientY - rect.top; + e.target.style.setProperty("--x", `${x}px`); + e.target.style.setProperty("--y", `${y}px`); + window.location.href = buildGoogleOAuthUrl("my-page"); }; @@ -29,54 +36,48 @@ export default function LoginPage() { }; return ( -
+
쉽고 빠른 이벤트 관리 플랫폼
+
본 서비스는 소셜 로그인 정보를 기반으로 안전하게 운영됩니다.