-
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.
- Loading branch information
Showing
3 changed files
with
37 additions
and
32 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 |
---|---|---|
@@ -1,54 +1,60 @@ | ||
'use client' | ||
|
||
import { useEffect } from 'react'; | ||
import Paper from '@mui/material/Paper'; | ||
import Button from '@mui/material/Button'; | ||
import Stack from '@mui/material/Stack'; | ||
import Typography from '@mui/material/Typography'; | ||
import Image from 'next/image' | ||
import { | ||
Paper, | ||
Button, | ||
Stack, | ||
Typography | ||
} from '@mui/material'; | ||
|
||
const handleLoginWithGoogle = async () => { | ||
window.location.replace(`https://api.a-eye.live/oauth2/authorization/google`); | ||
} | ||
function GoogleLoginButton() { | ||
const handleLoginWithGoogle = async () => { | ||
window.location.replace(`https://api.a-eye.live/oauth2/authorization/google`); | ||
} | ||
|
||
const handleLoginWithKakao = async () => { | ||
window.location.replace(`https://api.a-eye.live/oauth2/authorization/kakao`); | ||
return ( | ||
<Image | ||
src="/signin-assets/[email protected]" | ||
width={189} | ||
height={40} | ||
alt="kakao-login-button" | ||
onClick={handleLoginWithGoogle} | ||
/> | ||
); | ||
} | ||
|
||
function KakaoLoginButton() { | ||
const handleLoginWithKakao = async () => { | ||
window.location.replace(`https://api.a-eye.live/oauth2/authorization/kakao`); | ||
} | ||
|
||
return ( | ||
<Image | ||
src="/signin-assets/kakao_login_medium_narrow.png" | ||
width={183} | ||
height={45} | ||
alt="kakao-login-button" | ||
onClick={handleLoginWithKakao} | ||
/> | ||
); | ||
} | ||
|
||
function LoginCard() { | ||
return ( | ||
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }}> | ||
<Paper elevation={24} style={{ padding: '60px', textAlign: 'center' }}> | ||
<Stack spacing={3}> | ||
<Typography variant="h4">AEYE</Typography> | ||
<Button | ||
variant="contained" | ||
sx={{ bgcolor: '#65d586', '&:hover': { bgcolor: '#4caf50' } }} | ||
onClick={handleLoginWithGoogle} | ||
> | ||
Login with Google | ||
</Button> | ||
<Button | ||
variant="contained" | ||
sx={{ bgcolor: '#65d586', '&:hover': { bgcolor: '#4caf50' } }} | ||
onClick={handleLoginWithKakao} | ||
> | ||
Login with Kakao | ||
</Button> | ||
<GoogleLoginButton /> | ||
<KakaoLoginButton /> | ||
</Stack> | ||
</Paper> | ||
</div> | ||
); | ||
} | ||
|
||
function Logo() { | ||
return ( | ||
<div> | ||
logo image | ||
</div> | ||
); | ||
} | ||
|
||
export default function Landing() { | ||
useEffect(() => { | ||
document.body.style.margin = '0'; | ||
|
@@ -84,7 +90,6 @@ export default function Landing() { | |
|
||
return ( | ||
<Stack> | ||
<Logo /> | ||
<LoginCard /> | ||
</Stack> | ||
); | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.