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 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: '', isOauth: false } const [formValues, setFormValues] = useState(initValues) const [userExist, setUserExist] = useState(false) const [alertShow, setAlertShow] = useState(false) function handleChange(event) { const { name, value } = event.target setFormValues({ ...formValues, [name]: value }) } async function handleSubmit(event) { event.preventDefault(); const res = await axios.post(routesClient.signup, formValues) console.log('existing_user : ', res.data.contents.existing_user) setUserExist(res.data.contents.existing_user) setAlertShow(true) } return ( 계정 생성하기 이메일 또는 소셜미디어로 계정을 생성하세요
{!userExist ? 😊 계정 생성이 완료 되었습니다. 로그인 하러가기 ➞ : 🤔 이미 존재하는 계정입니다. 로그인 하러가기 ➞ }

OR
KAKAO
) } export default SignupComp;