import React, { useState } from 'react'; import '../App.css' import { Form, Button, Row, Col, Card, Alert, FloatingLabel } from 'react-bootstrap'; import { LoginWithKakao } from '../utils/Oauth'; import axios from 'axios'; import { routesClient } from '../routesClient'; function LoginComp() { const cardstyled = { margin: 'auto', padding: '1em', display: 'flex', justifyContent: 'center', width: '100%', borderWidth: '3px', borderRadius: '20px', borderColor: 'rgb(110, 189, 142)', color: '#04AB70' } const inboxstyled = { display: 'flex', flexDirection: 'column', maxWidth: '80%', justifyContent: 'center', margin: 'auto', padding: '0.5em', color: 'black' } const [alertShow, setAlertShow] = useState(false) const [emailAddress, setEmailAddress] = useState('') const [mailSend, setMailSend] = useState(false) function addressUrl() { const afterAt = emailAddress.split('@')[1] if (afterAt) { const newLink = 'https://www.' + afterAt; window.location.replace(newLink); } if (afterAt === 'korea.ac.kr') { window.location.replace('https://www.gmail.com'); } } function handleChange(event) { setEmailAddress(event.target.value) } async function handleSubmit(event) { event.preventDefault(); const res = await axios.post(routesClient.login, { email: emailAddress, isOauth: false }) console.log('mail_sending : ', res.data.contents.mail_sending) setMailSend(res.data.contents.mail_sending) setAlertShow(true) localStorage.setItem('login', true) } return ( LOGIN Log in with your social media account or email address
{mailSend ? 😍 이메일 전솑이 μ™„λ£Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 이메일 확인 ν•˜λŸ¬κ°€κΈ° ➞ : 😭 이메일을 μ •ν™•ν•˜κ²Œ μ μ–΄μ£Όμ„Έμš”. νšŒμ›κ°€μž… ν•˜λŸ¬κ°€κΈ° ➞ }

OR
{/* μ„Έλ―Έμ½œλ‘ μ΄ λΆ™μœΌλ©΄ μ΅œμƒλ‹¨ 이동 x */} KAKAO
) } export default LoginComp;