mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-27 09:22:44 +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(){
|
||||
if(!this.state.saveLocation && this.props.uiItems.username) {
|
||||
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
|
||||
let saveLocation = window.localStorage.getItem(SAVEKEY) || '';
|
||||
if(saveLocation == '') {
|
||||
saveLocation = 'HOMEBREWERY';
|
||||
if(this.state.uiItems.googleId) {
|
||||
saveLocation = 'GOOGLE-DRIVE';
|
||||
}
|
||||
};
|
||||
let saveLocation = window.localStorage.getItem(SAVEKEY);
|
||||
saveLocation = saveLocation ?? this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY';
|
||||
this.makeActive(saveLocation);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user