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'; 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 [emailSentAlert, setEmailSentAlert] = useState(false) const [alertShow, setAlertShow] = useState(false) const [emailAddress, setEmailAddress] = useState('') function CheckEmailSend() { localStorage.setItem('login_email_Address', emailAddress) const emailIs = localStorage.getItem('login_email_Address').split('@')[1] if (emailIs) { setAlertShow(true) setEmailSentAlert(false) } else { setAlertShow(true) setEmailSentAlert(true) } } function addressUrl() { const afterAt = localStorage.getItem('login_email_Address').split('@')[1] const newLink = 'https://www.' + afterAt; window.open(newLink); } function handleChange(event) { setEmailAddress(event.target.value) } console.log(emailAddress) async function handleSubmit(event) { event.preventDefault(); const res = await axios.post("/api/login", { email: emailAddress }) console.log(res) } return ( LOGIN Log in with your social media account or email address
{!emailSentAlert ? 😍 이메일 전솑이 μ™„λ£Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 이메일 확인 ν•˜λŸ¬κ°€κΈ° ➞ : 😭 이메일을 μ •ν™•ν•˜κ²Œ μ μ–΄μ£Όμ„Έμš”. νšŒμ›κ°€μž… ν•˜λŸ¬κ°€κΈ° ➞ }

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