import styles from "./signup.module.scss"; import { useState } from 'react'; const Signup = () => { const [userText, setUserState] = useState({ userID: '', userName: '', userBirthday: '', userMbnum: '', userPassword: '', userRePassword: '', }) // 비밀번호와 비밀번호 확인 일치여부, 중복확인 창 const [passwordError,setPasswordError] = useState(false); const [overlapId,setOverlapIdError] = useState(false); const handleUserOnChange = (e) => { setUserState({ ...userText, [e.target.name]: e.target.value }) if(e.target.name === "userRePassword"){ setPasswordError(e.target.value !== userText.userPassword); }} //중복되었으면 중복확인 창 띄우는 여부를 state에 전달 const handleOverlapIdError = (e) => { e.preventDefault(); setOverlapIdError(true); } //가입완료 누르면 콘솔창에 전달하려는 state 보여줌 const onSubmit = (e) => { e.preventDefault(); console.log(userText) } return (
) } export default Signup