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 handleUserOnChange = (e) => { setUserState({ ...userText, [e.target.name]: e.target.value }) if(e.target.name === "userRePassword"){ setPasswordError(e.target.value !== userText.userPassword); }} const onSubmit = (e) => { e.preventDefault(); if(userText.userPassword !== userText.userRePassword){ return setPasswordError(true); } console.log(userText); } return (
{passwordError &&

비밀번호가 일치하지 않습니다.

}
{/* 아이디 중복 확인 모달창 */}
) } export default Signup