mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
transform animation to computed method
This commit is contained in:
parent
ab8bec8a4e
commit
adcff96e29
@ -44,24 +44,24 @@ export default {
|
||||
oldPublicKey: '',
|
||||
communities: [],
|
||||
icon: '',
|
||||
animation: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
animation() {
|
||||
return this.$apollo.queries.GetCommunities.loading ? 'spin' : ''
|
||||
},
|
||||
},
|
||||
apollo: {
|
||||
GetCommunities: {
|
||||
fetchPolicy: 'network-only',
|
||||
query() {
|
||||
this.animation = 'spin'
|
||||
|
||||
return getCommunities
|
||||
},
|
||||
update({ getCommunities }) {
|
||||
this.communities = getCommunities
|
||||
this.animation = ''
|
||||
},
|
||||
error({ message }) {
|
||||
this.toastError(message)
|
||||
this.animation = ''
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user