import React, { useEffect, 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 [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("/api/signup", formValues) console.log('existing_user : ', res.data.contents.existing_user) setUserExist(res.data.contents.existing_user) setAlertShow(true) } useEffect(() => { async function test() { const res = await axios.get('/api/signup') console.log(res.contents) } test() }, []) return ( Create an Account Sign up with your social media account or email address
{!userExist ? 😊 계정 생성이 μ™„λ£Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ : πŸ€” 이미 μ‘΄μž¬ν•˜λŠ” κ³„μ •μž…λ‹ˆλ‹€. 둜그인 ν•˜λŸ¬κ°€κΈ° ➞ }

OR
KAKAO
) } export default SignupComp;