0
0
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:
G.Ambatte
2023-08-11 11:15:27 +12:00
committed by GitHub
parent f8b42031fb
commit 73832fabcc

View File

@@ -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);
}
},