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:
Daniel J. Summers
2017-09-30 16:12:14 -05:00
parent 834eaf2416
commit e0d27a708d
8 changed files with 41 additions and 11 deletions
+6 -1
View File
@@ -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
},