Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function onRoute(event) {
const state = event.state || {};
if (state.app) {
store.dispatch(Actions.APP_ROUTE_RUN);
} else {
store.dispatch(Actions.APP_ROUTE_LANDING);
}
}
store.watch(
methods: Object.assign(
{
recordError(error) {
this.errors.push(error);
},
toggleLanding() {
if (this.landingVisible) {
this.showApp();
} else {
this.showLanding();
}
},
},
mapActions({
showApp: Actions.APP_ROUTE_RUN,
showLanding: Actions.APP_ROUTE_LANDING,
connect: Actions.NETWORK_CONNECT,
})
),
};