mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
45 lines
919 B
Vue
45 lines
919 B
Vue
<template>
|
|
<div>
|
|
<h1 class="ds-heading ds-heading-h1">My Groups</h1>
|
|
<group-teaser />
|
|
<br />
|
|
<br />
|
|
<group-list :items="responseGroupListQuery" />
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import GroupTeaser from '~/components/Group/GroupTeaser.vue'
|
|
import GroupList from '~/components/Group/GroupList.vue'
|
|
import { groupQuery } from '~/graphql/groups.js'
|
|
|
|
export default {
|
|
name: 'MyGroups',
|
|
components: {
|
|
GroupTeaser,
|
|
GroupList,
|
|
},
|
|
data() {
|
|
return {
|
|
responseGroupListQuery: [],
|
|
}
|
|
},
|
|
methods: {
|
|
async groupListQuery() {
|
|
try {
|
|
const response = await this.$apollo.query({
|
|
query: groupQuery,
|
|
})
|
|
this.responseGroupListQuery = response.data.Group
|
|
} catch (error) {
|
|
this.responseGroupListQuery = []
|
|
} finally {
|
|
this.pending = false
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
this.groupListQuery()
|
|
},
|
|
}
|
|
</script>
|