import React, { useEffect, useState } from 'react'
import '../App.css'
import { Form, Modal, Button, Row, Col, Image, DropdownButton, ButtonGroup, Dropdown, Card } from 'react-bootstrap';
// import { KAKAO_AUTH_URL } from '../components/Oauth';
import { handleLogin } from '../utils/Auth';
import { isOauth } from '../utils/Auth';
function SignupComp() {
const noticestyled = {
display: 'flex',
justifyContent: 'center',
color: 'gray',
margin: 'auto',
fontSize: '0.8em',
visibility: 'hidden',
}
const cardstyled = {
margin: 'auto',
padding: '1em',
display: 'flex',
justifyContent: 'center',
width: '100%',
borderWidth: '3px',
borderRadius: '20px',
borderColor: 'rgb(110, 189, 142)',
color: '#04AB70'
}
const btnstyled2 = {
background: 'white',
margin: '1px',
maxWidth: 'fit-content',
borderWidth: '2px',
color: 'rgb(110, 189, 142)',
borderColor: 'rgba(195, 195, 195, 0.753)',
borderRadius: '20px'
}
const inboxstyled = {
display: 'flex',
flexDirection: 'column',
maxWidth: '100%',
justifyContent: 'center',
margin: 'auto',
padding: '1rem'
}
const aftershow = {
display : 'none'
}
function loginWithKakao() {
window.Kakao.Auth.authorize({
redirectUri: 'http://localhost:3000/oauth'
})
}
const initValues = {
email: '',
authNumber: '',
}
const [formValues, setFormValues] = useState(initValues)
const [formError, setFormError] = useState({})
const [validated, setValidated] = useState(false)
function submitForm() {
console.log('formValues', formValues);
console.log(!formValues['username']);
console.log(!formValues['email']);
console.log('Error', formError)
}
function handleChange(event) {
const { name, value } = event.target
setFormValues({ ...formValues, [name]: value })
}
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)
}
// if (success) {
// alert('회원가입 되었습니다.')
// return
// }
const [emailSubm, setEmailSubm] = useState(false)
const [authCodecheck, setAuthCodecheck] = useState(false)
const [locCodeShow, setLocCodeShow] = useState(false)
function handleClickSubm() {
// setEmailSubm(true);
const subm = document.getElementById("subm-mailSent");
subm.style.visibility = 'visible'
const aftermail = document.getElementById('AftermailSent');
aftermail.style.display = ''
}
function handleClickAuth() {
var authToInt = parseInt(formValues.authNumber, 10)
if (authToInt == 0) {
setAuthCodecheck(true);
const auth = document.getElementById('auth-check')
auth.style.visibility = 'visible'
}
else {
setAuthCodecheck(false);
}
console.log(typeof (authToInt))
console.log(authToInt)
}
function handleClickLoc() {
setLocCodeShow(true);
const auth = document.getElementById('loc-code')
auth.style.visibility = 'visible'
}
console.log(emailSubm);
// console.log
// const [isOauth, setIsOauth] = useState(false)
const iiiiioauthhh = true
return (
Create an Account
Sign up with your social media account or email address
메일이 발송되었습니다.
인증이
>
:
암것도안나와~
}
{['도', '시군구', '읍면동'].map((localname) => (
Action
Another action
Something else here
Separated link
))}
지역코드
KAKAO
GOOGLE
FACEBOOK
)
}
export default SignupComp;