Implement SessionStore
This wraps session-related state into a basic flux store. The localStorage item 'mx_pass' is the only thing managed by this store for now but it could easily be extended to track other items (like the teamToken which is passed around through props a lot)
This commit is contained in:
parent
8725ef3863
commit
1176573f39
6 changed files with 104 additions and 32 deletions
|
@ -139,9 +139,6 @@ module.exports = React.createClass({
|
|||
// Team token for the referral link. If falsy, the referral section will
|
||||
// not appear
|
||||
teamToken: React.PropTypes.string,
|
||||
|
||||
// the user is a PWLU (/w password stashed in localStorage 'mx_pass')
|
||||
cachedPassword: React.PropTypes.string,
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
|
@ -898,7 +895,6 @@ module.exports = React.createClass({
|
|||
rowLabelClassName="mx_UserSettings_profileLabelCell"
|
||||
rowInputClassName="mx_UserSettings_profileInputCell"
|
||||
buttonClassName="mx_UserSettings_button mx_UserSettings_changePasswordButton"
|
||||
cachedPassword={this.props.cachedPassword}
|
||||
onError={this.onPasswordChangeError}
|
||||
onFinished={this.onPasswordChanged} />
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue