mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 22:32:41 +00:00
Update client/homebrew/pages/accountPage/accountPage.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
@@ -34,13 +34,8 @@ const AccountPage = createClass({
|
|||||||
componentDidMount : function(){
|
componentDidMount : function(){
|
||||||
if(!this.state.saveLocation && this.props.uiItems.username) {
|
if(!this.state.saveLocation && this.props.uiItems.username) {
|
||||||
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
|
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
|
||||||
let saveLocation = window.localStorage.getItem(SAVEKEY) || '';
|
let saveLocation = window.localStorage.getItem(SAVEKEY);
|
||||||
if(saveLocation == '') {
|
saveLocation = saveLocation ?? this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY';
|
||||||
saveLocation = 'HOMEBREWERY';
|
|
||||||
if(this.state.uiItems.googleId) {
|
|
||||||
saveLocation = 'GOOGLE-DRIVE';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.makeActive(saveLocation);
|
this.makeActive(saveLocation);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user