import React, { useState } from 'react' import '../App.css' import { Form, Button, Row, Col, Card, Alert } from 'react-bootstrap'; import { LoginWithKakao } from '../utils/Oauth'; 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: '1rem' } const initValues = { 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() { localStorage.setItem('signup_username', formValues.name) localStorage.setItem('signup_email_Address', formValues.email) 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) // setUserExist(true) } } function handleSubmit(event) { const form = event.currentTarget; console.log('formValues', formValues); console.log('formValues.values', Object.values(formValues)[0].length); // console.log(form) // if (Object.values(formValues)[0].length !== 0) { //form.checkValidity() === false // event.preventDefault(); // event.stopPropagation(); // } console.log(validated) setValidated(true); // const form = event.current // setFormError(validate(formValues)) // setIsSubmit(true) } function handleClickSubm() { // setEmailSubm(true); const subm = document.getElementById("subm-mailSent"); subm.style.visibility = 'visible' // const aftermail = document.getElementById('AftermailSent'); // aftermail.style.display = '' } return ( Create an Account Sign up with your social media account or email address
{!userExist ? 😊 계정 생성이 μ™„λ£Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ : πŸ€” 이미 μ‘΄μž¬ν•˜λŠ” κ³„μ •μž…λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ }


OR
KAKAO
) } export default SignupComp;