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 SignupComp() { 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 initValues = { nick_name: '', email: '' } const [formValues, setFormValues] = useState(initValues) const [validated, setValidated] = useState(false) const [emailSubm, setEmailSubm] = useState(false) const [userExist, setUserExist] = useState(false) const [alertShow, setAlertShow] = useState(false) function handleChange(event) { const { name, value } = event.target setFormValues({ ...formValues, [name]: value }) } console.log('???', formValues) // function CheckUserExist() { // const signUser = localStorage.getItem('signup_username') // const signEmail = localStorage.getItem('signup_email_Address').split('@')[1] // if (signEmail && signUser) { // setAlertShow(true) // setUserExist(!userExist) // } // else // if (!signEmail) { // setAlertShow(false) // } // } async function handleSubmit(event) { event.preventDefault(); await axios.post("/api/signup", formValues) } return ( Create an Account Sign up with your social media account or email address
{!userExist ? 😊 계정 생성이 μ™„λ£Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ : πŸ€” 이미 μ‘΄μž¬ν•˜λŠ” κ³„μ •μž…λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ }

OR
KAKAO
) } export default SignupComp;