bugs fixes

This commit is contained in:
Matthieu Bessat 2020-07-23 12:42:43 +02:00
parent 419e6a1a71
commit 46953da4cc
7 changed files with 131 additions and 62 deletions

View file

@ -18,6 +18,7 @@ interface State {
debug: boolean;
validateMain: boolean;
validateMainCallback: any;
onMainReady: any;
}
const defaultState: State = {
@ -52,6 +53,8 @@ const defaultState: State = {
}
},
delegate: {
_id: '',
slug: '',
validationState: 'unaware',
admiName: '',
email: '',
@ -59,6 +62,7 @@ const defaultState: State = {
},
debug: false,
validateMain: false,
onMainReady: () => false,
validateMainCallback: (d = false) => d
}
@ -99,6 +103,9 @@ export default new Vuex.Store({
state.validateMain = false
return callback(d)
}
},
ON_MAIN_READY (state: State, callback) {
state.onMainReady = callback
}
},
actions: {