Skip to content

Commit a1e87ea

Browse files
committed
Related to velopert#223
1 parent c2efc2b commit a1e87ea

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

24/blog/blog-frontend(24-2)/src/containers/auth/RegisterForm.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const RegisterForm = ({ history }) => {
1212
form: auth.register,
1313
auth: auth.auth,
1414
authError: auth.authError,
15-
user: user.user
15+
user: user.user,
1616
}));
1717
// 인풋 변경 이벤트 핸들러
1818
const onChange = e => {
@@ -21,8 +21,8 @@ const RegisterForm = ({ history }) => {
2121
changeField({
2222
form: 'register',
2323
key: name,
24-
value
25-
})
24+
value,
25+
}),
2626
);
2727
};
2828

@@ -38,8 +38,10 @@ const RegisterForm = ({ history }) => {
3838
// 비밀번호가 일치하지 않는다면
3939
if (password !== passwordConfirm) {
4040
setError('비밀번호가 일치하지 않습니다.');
41-
changeField({ form: 'register', key: 'password', value: '' });
42-
changeField({ form: 'register', key: 'passwordConfirm', value: '' });
41+
dispatch(changeField({ form: 'register', key: 'password', value: '' }));
42+
dispatch(
43+
changeField({ form: 'register', key: 'passwordConfirm', value: '' }),
44+
);
4345
return;
4446
}
4547
dispatch(register({ username, password }));

24/blog/blog-frontend/src/containers/auth/RegisterForm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ const RegisterForm = ({ history }) => {
3838
// 비밀번호가 일치하지 않는다면
3939
if (password !== passwordConfirm) {
4040
setError('비밀번호가 일치하지 않습니다.');
41-
changeField({ form: 'register', key: 'password', value: '' });
42-
changeField({ form: 'register', key: 'passwordConfirm', value: '' });
41+
dispatch(changeField({ form: 'register', key: 'password', value: '' }));
42+
dispatch(
43+
changeField({ form: 'register', key: 'passwordConfirm', value: '' }),
44+
);
4345
return;
4446
}
4547
dispatch(register({ username, password }));

25/blog/blog-frontend/src/containers/auth/RegisterForm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ const RegisterForm = ({ history }) => {
3838
// 비밀번호가 일치하지 않는다면
3939
if (password !== passwordConfirm) {
4040
setError('비밀번호가 일치하지 않습니다.');
41-
changeField({ form: 'register', key: 'password', value: '' });
42-
changeField({ form: 'register', key: 'passwordConfirm', value: '' });
41+
dispatch(changeField({ form: 'register', key: 'password', value: '' }));
42+
dispatch(
43+
changeField({ form: 'register', key: 'passwordConfirm', value: '' }),
44+
);
4345
return;
4446
}
4547
dispatch(register({ username, password }));

26/blog/blog-frontend/src/containers/auth/RegisterForm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ const RegisterForm = ({ history }) => {
3838
// 비밀번호가 일치하지 않는다면
3939
if (password !== passwordConfirm) {
4040
setError('비밀번호가 일치하지 않습니다.');
41-
changeField({ form: 'register', key: 'password', value: '' });
42-
changeField({ form: 'register', key: 'passwordConfirm', value: '' });
41+
dispatch(changeField({ form: 'register', key: 'password', value: '' }));
42+
dispatch(
43+
changeField({ form: 'register', key: 'passwordConfirm', value: '' }),
44+
);
4345
return;
4446
}
4547
dispatch(register({ username, password }));

27/blog-frontend/src/containers/auth/RegisterForm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ const RegisterForm = ({ history }) => {
3838
// 비밀번호가 일치하지 않는다면
3939
if (password !== passwordConfirm) {
4040
setError('비밀번호가 일치하지 않습니다.');
41-
changeField({ form: 'register', key: 'password', value: '' });
42-
changeField({ form: 'register', key: 'passwordConfirm', value: '' });
41+
dispatch(changeField({ form: 'register', key: 'password', value: '' }));
42+
dispatch(
43+
changeField({ form: 'register', key: 'passwordConfirm', value: '' }),
44+
);
4345
return;
4446
}
4547
dispatch(register({ username, password }));

0 commit comments

Comments
 (0)