Fixes mainmenu toggle
@@ -36,9 +36,12 @@ export default function(viewState = initialState, action = {}) {
case actionTypes.view.showMainMenu:
return viewState.set("showMainMenu", true);
- case actionTypes.account.store:
case actionTypes.account.reset:
+ return initialState;
+
+ case actionTypes.account.store:
case actionTypes.view.hideMainMenu: {
+ if (action.payload) {
const emailVerified = action.payload.get("emailVerified");
const acceptedTermsOfService = action.payload.get(
"acceptedTermsOfService"
@@ -49,6 +52,7 @@ export default function(viewState = initialState, action = {}) {
if (isAnonymous || !emailVerified || !acceptedTermsOfService) {
viewState = viewState.set("showSlideIns", true);
}
+ }
return viewState.set("showMainMenu", false);
}
