Changed the register community page so that it loads community informations if not provided.

This commit is contained in:
elweyn 2021-10-25 10:54:21 +02:00
parent 35b01d9010
commit 5febfc337e

View File

@ -49,12 +49,32 @@
</div>
</template>
<script>
import { communityInfo } from '../../graphql/queries'
export default {
name: 'registerCommunity',
data() {
return {}
},
methods: {},
methods: {
async onCreated() {
if (!this.$state.store.community) {
this.$apollo
.query({
query: communityInfo,
})
.then((result) => {
this.$store.commit('community', result.data.getCommunityInfo)
})
.catch((error) => {
this.$toasted.error(error.message)
})
}
},
},
created() {
this.onCreated()
},
}
</script>
<style></style>