aboutsummaryrefslogtreecommitdiff
path: root/src/actions/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/app.js')
-rw-r--r--src/actions/app.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/actions/app.js b/src/actions/app.js
index ef3f18e..aecefc4 100644
--- a/src/actions/app.js
+++ b/src/actions/app.js
@@ -26,8 +26,9 @@ export const navigate = (path) => (dispatch) => {
dispatch(updateDrawerState(false));
};
-import { snapshotForums } from './firebaseFirestore.js';
-var hasSubscribedPosts = false;
+import {snapshotForums} from './firebaseFirestore.js';
+
+var isSubscribedForums = false;
const loadPage = (page) => (dispatch) => {
switch(page) {
@@ -44,12 +45,11 @@ const loadPage = (page) => (dispatch) => {
break;
case 'forums':
- import('../components/mao-forums.js').then((module) => {
- if(!hasSubscribedPosts) {
- dispatch(snapshotForums());
- hasSubscribedPosts = true;
- }
- });
+ import('../components/mao-forums.js');
+ if(!isSubscribedForums) {
+ dispatch(snapshotForums());
+ isSubscribedForums = true;
+ }
break;
case 'account':