mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
45 lines
888 B
Vue
45 lines
888 B
Vue
<template>
|
|
<div>
|
|
<div>my groups</div>
|
|
<group-teaser />
|
|
<br />
|
|
<br />
|
|
<group-card :items="responseGroupListQuery" />
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import GroupTeaser from '~/components/Group/GroupTeaser.vue'
|
|
import GroupCard from '~/components/Group/GroupCard.vue'
|
|
import { groupQuery } from '~/graphql/groups.js'
|
|
|
|
export default {
|
|
name: 'MyGroups',
|
|
components: {
|
|
GroupTeaser,
|
|
GroupCard,
|
|
},
|
|
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>
|