diff --git a/src/store/auth/actions.js b/src/store/auth/actions.js index 37eefbe..7279097 100644 --- a/src/store/auth/actions.js +++ b/src/store/auth/actions.js @@ -50,8 +50,8 @@ function handleAuthStateChange ({ commit, dispatch }) { { root: true } // allows to trigger an action which is in a different module ) } else { - commit('tasks/clearTasks', null, { root: true }) commit('setLoggedIn', false) + commit('tasks/clearTasks', null, { root: true }) LocalStorage.set('loggedIn', false) this.$router.replace('/auth') } diff --git a/src/store/tasks/actions.js b/src/store/tasks/actions.js index 616dce8..8ae6477 100644 --- a/src/store/tasks/actions.js +++ b/src/store/tasks/actions.js @@ -69,10 +69,6 @@ function fbReadData ({ commit }) { } commit('addTask', payload) - }, error => { - if (error) { - showErrorMessage(error.message) - } }) // listen on tasks being changed @@ -84,20 +80,12 @@ function fbReadData ({ commit }) { } commit('updateTask', payload) - }, error => { - if (error) { - showErrorMessage(error.message) - } }) // listen on tasks being deleted userTasks.on('child_removed', snapshot => { const id = snapshot.key commit('deleteTask', id) - }, error => { - if (error) { - showErrorMessage(error.message) - } }) }