Run Prettier

This commit is contained in:
Vesa Luusua 2017-09-25 23:03:17 +03:00
parent 33c0a36016
commit f7a0e569d4
3 changed files with 20 additions and 8 deletions

View file

@ -100,11 +100,14 @@ class PasswordChangeFormComponent extends Component {
const submitDisabled = invalid || submitting || inProgress;
return (
<form className={classes} onSubmit={values => {
handleSubmit(values).then(() => {
this.resetTimeoutId = window.setTimeout(reset, RESET_TIMEOUT);
});
}}>
<form
className={classes}
onSubmit={values => {
handleSubmit(values).then(() => {
this.resetTimeoutId = window.setTimeout(reset, RESET_TIMEOUT);
});
}}
>
<div className={css.newPasswordSection}>
<TextInputField
type="password"
@ -149,7 +152,7 @@ class PasswordChangeFormComponent extends Component {
</form>
);
}
};
}
PasswordChangeFormComponent.defaultProps = {
rootClassName: null,

View file

@ -18,7 +18,12 @@ export default function reducer(state = initialState, action = {}) {
const { type, payload } = action;
switch (type) {
case CHANGE_PASSWORD_REQUEST:
return { ...state, changePasswordInProgress: true, changePasswordError: null, passwordChanged: false };
return {
...state,
changePasswordInProgress: true,
changePasswordError: null,
passwordChanged: false,
};
case CHANGE_PASSWORD_SUCCESS:
return { ...state, changePasswordInProgress: false, passwordChanged: true };
case CHANGE_PASSWORD_ERROR:

View file

@ -156,7 +156,11 @@ const mapStateToProps = state => {
// PageLayout needs authInfoError and logoutError, Topbar needs isAuthenticated
const { authInfoError, isAuthenticated, logoutError } = state.Auth;
// Topbar needs user info.
const { changePasswordError, changePasswordInProgress, passwordChanged } = state.PasswordChangePage;
const {
changePasswordError,
changePasswordInProgress,
passwordChanged,
} = state.PasswordChangePage;
const {
currentUser,
currentUserHasListings,