diff --git a/frontend/src/store/auth/index.js b/frontend/src/store/auth/index.js index 33e4b36c..cb889a42 100644 --- a/frontend/src/store/auth/index.js +++ b/frontend/src/store/auth/index.js @@ -1,6 +1,7 @@ // firebase authentication class import auth from './config' import CV from './CV' +import { startLoad, endLoad } from '../../utils/helpers' import { createProfile, updateProfile, getSelf } from '@/utils/api/auth' @@ -194,7 +195,9 @@ const actions = { * If anything fails it clears everything */ async checkAuth({ commit, dispatch, state }) { - commit('SET_LOADING', true) + // app loading screen while checking auth + startLoad('Auth') + try { // returns user object const user = await new Promise((resolve, reject) => { @@ -238,7 +241,8 @@ const actions = { // Note we _need_ to do this before returning! commit('SIGNAL_AUTH_CV') - commit('SET_LOADING', false) + // done auth check; show the app + endLoad('Auth') }, /**