aboutsummaryrefslogtreecommitdiff
path: root/src/actions/app.js
diff options
context:
space:
mode:
authorMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-13 23:35:00 -0400
committerMichael Foiani <mfoiani2019@communiyschoolnaples.org>2018-08-13 23:35:00 -0400
commit2ea02124a564c54f20ea530b56cd9f932212f9f3 (patch)
tree48c42c4a1403d83f2f32a00e24c91dd584433d55 /src/actions/app.js
parentfe125c5deb979d753d8b903ce6cdeb968e1c5f46 (diff)
Tried many things to try to fix the glitch. I was successful. Yay! 5 hours of debugging a bug is finally over. :)
Diffstat (limited to 'src/actions/app.js')
-rw-r--r--src/actions/app.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/actions/app.js b/src/actions/app.js
index 422c52d..ef3f18e 100644
--- a/src/actions/app.js
+++ b/src/actions/app.js
@@ -29,7 +29,7 @@ export const navigate = (path) => (dispatch) => {
import { snapshotForums } from './firebaseFirestore.js';
var hasSubscribedPosts = false;
-const loadPage = (page) => (dispatch, getState) => {
+const loadPage = (page) => (dispatch) => {
switch(page) {
case 'home':
import('../components/mao-home.js');
@@ -57,12 +57,7 @@ const loadPage = (page) => (dispatch, getState) => {
break;
case 'admin':
- if(getState().firebaseAdmin.isAdmin) {
- import('../components/mao-admin.js');
- } else {
- page = 'view404';
- import('../components/my-view404.js');
- }
+ import('../components/mao-admin.js');
break;
default: