김건희

[Update] Change Address

......@@ -11,7 +11,7 @@ function App() {
<div>
<Routes>
<Route exact path = "/login" element = {<LoginPage/>}/>
<Route exact path = "/register" element = {<RegisterPage/>}/>
<Route exact path = "/" element = {<RegisterPage/>}/>
<Route exact path = "/main" element = {<MainPage/>}/>
<Route exact path = "/weather" element = {<WeatherPage/>}/>
<Route exact path = "/recommand" element = {<RecommandPage/>}/>
......
......@@ -132,11 +132,11 @@ function MainPage(props) {
const onClickLogout = useCallback((event) => {
dispatch(logout());
navigate('../login');
navigate('/login');
})
const onClickRegister = useCallback((event) => {
navigate('../register');
navigate('/');
})
const onSubmitHandler = useCallback((event) => { //제출 전 오류 확인 함수
......@@ -256,7 +256,7 @@ function MainPage(props) {
<hr/>
<div className="main-btn-area" onClick={onSubmitHandler}>
<button className="submit-btn">
양식 제출
날씨 정보
</button>
</div>
<div className="main-check-variable">
......
......@@ -33,11 +33,11 @@ function RecommandPage(props) {
const onClickLogout = useCallback((event) => {
dispatch(logout());
navigate('../login');
navigate('/login');
})
const onClickRegister = useCallback((event) => {
navigate('../register');
navigate('/');
})
const onClickTitle = useCallback((event) => {
......
......@@ -86,6 +86,10 @@ function RegisterPage(props) {
}
}, [checkPasswordError]);
const onClickLogIn = useCallback((event) => {
navigate('../login');
})
const onPasswordCheckHandler = useCallback((event) => {
//비밀번호를 입력할때마다 password 를 검증하는 함수
setPasswordError(event.currentTarget.value !== Password);
......@@ -131,6 +135,7 @@ function RegisterPage(props) {
}, [checkIdError, checkNameError, checkPasswordError, checkRegisterError, checkSexError, Password, PasswordCheck, Sex, dispatch, registerResult, checkRegister]);
return (
<>
<div id="body">
<div className="register-box">
<h2>회원가입</h2>
......@@ -199,11 +204,10 @@ function RegisterPage(props) {
가입하기
</button>
</div>
<div className="check-variable">
</div>
{checkRegisterError && <div style={{ color: 'red' }}>정보를 제대로 입력해주세요.</div>}
</div>
</div>
</div>
</>
);
}
......
......@@ -4,6 +4,7 @@ import { useNavigate } from "react-router-dom";
import { recommend } from "../../../modules/clothes";
import { logout } from "../../../modules/user";
import "../style/WeatherPage.scss"
function WeatherPage(props) {
const dispatch = useDispatch();
const navigate = useNavigate();
......@@ -158,7 +159,6 @@ function WeatherPage(props) {
useEffect(() => {
user.then((result) => {
console.log(result);
if (result.logData.gender === '0') {
userGender = 0;
......@@ -172,11 +172,11 @@ function WeatherPage(props) {
const onClickLogout = useCallback((event) => {
dispatch(logout());
navigate('../login');
navigate('/login');
})
const onClickRegister = useCallback((event) => {
navigate('../register');
navigate('/');
})
const onClickTitle = useCallback((event) => {
......@@ -198,7 +198,6 @@ function WeatherPage(props) {
rain : isRain
}
console.log(sendData);
dispatch(recommend(sendData));
navigate('/recommand');
......@@ -258,7 +257,7 @@ function WeatherPage(props) {
</div>
<div className="weather-btn-area" onClick={onSubmitHandler}>
<button className="submit-btn">
양식 제출
추천
</button>
</div>
</div>
......
......@@ -4,6 +4,7 @@
box-sizing: border-box;
background-color: rgb(245, 235, 223);
}
#body {
display: flex;
justify-content: center;
......