Skip to content

Commit

Permalink
refactor: clean up layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenijesavic committed Sep 25, 2023
1 parent a983af9 commit e8e878d
Show file tree
Hide file tree
Showing 9 changed files with 597 additions and 614 deletions.
24 changes: 22 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,30 @@ import { mapActions, mapGetters, mapMutations } from 'vuex'
export default {
name: 'App',
apollo: {
dho: {
query: require('~/query/main-dho.gql'),
update: data => data.queryDho,
result (res) { this.$store.commit('dao/setDho', res.data.queryDho) },
fetchPolicy: 'no-cache'
}
},
computed: {
...mapGetters('accounts', ['account']),
...mapGetters('layout', ['alert'])
},
watch: {
account: {
async handler (value) {
if (value) {
await this.getPublicProfile(this.account)
}
},
immediate: true
},
alert: function (value) {
Notify.create({
type: value.level,
Expand Down Expand Up @@ -39,8 +58,10 @@ export default {
...mapActions('accounts', ['autoLogin']),
...mapActions('dao', ['initConfigs']),
...mapActions('layout', ['loadAlert']),
...mapMutations('layout', ['dismissAlert'])
...mapMutations('layout', ['dismissAlert']),
...mapActions('profiles', ['getPublicProfile'])
}
}
</script>

Expand All @@ -50,5 +71,4 @@ export default {
</template>

<style lang="stylus">
</style>
1 change: 0 additions & 1 deletion src/components/login/register-user-with-captcha-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ export default {
query.subscribe(({ data, loading }) => {
const value = data.queryDao
if (value.length > 0) {
this.$store.dispatch('accounts/checkMembership')
this.$router.push({ path: `/${daoUrl}/` })
}
})
Expand Down
Loading

0 comments on commit e8e878d

Please sign in to comment.