Skip to content

Commit 636848b

Browse files
committed
add flow types to mapStateToProps
1 parent ab802e2 commit 636848b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/views/settings/sections/login-credentials.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
logOutViaCredentials,
99
validateLoginCredentials,
1010
setLoginCredentials,
11+
type SettingsState,
1112
} from '../../../flux/parts/settings'
1213
import {connect} from 'react-redux'
1314
import noop from 'lodash/noop'
@@ -96,12 +97,11 @@ class CredentialsLoginSection extends React.Component {
9697
}
9798
}
9899

99-
function mapStateToProps(state) {
100+
function mapStateToProps(state: {settings: SettingsState}) {
100101
return {
101-
username: state.settings.credentials.username,
102-
password: state.settings.credentials.password,
103-
loggedIn: state.settings.credentials.valid,
104-
message: state.settings.credentials.error,
102+
initialUsername: state.settings.credentials.username,
103+
initialPassword: state.settings.credentials.password,
104+
loginState: state.settings.credentials.state,
105105
}
106106
}
107107

0 commit comments

Comments
 (0)