First cut of answered requests
- changed import to only bring in church rather than the entire lodash package - changed webpack config to exclude moment's locale - set the bearer token on load if the user is authenticated
This commit is contained in:
@@ -33,7 +33,12 @@ const logError = function (error) {
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
user: JSON.parse(localStorage.getItem('user_profile') || '{}'),
|
||||
isAuthenticated: this.auth0.isAuthenticated(),
|
||||
isAuthenticated: (() => {
|
||||
if (this.auth0.isAuthenticated()) {
|
||||
api.setBearer(localStorage.getItem('id_token'))
|
||||
}
|
||||
return this.auth0.isAuthenticated()
|
||||
})(),
|
||||
journal: {},
|
||||
isLoadingJournal: false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user