Files
habitica/website/client/components/groupLink.vue
2018-05-01 19:47:04 +02:00

22 lines
429 B
Vue

<template lang="pug">
b-link(
v-if='group',
@click.prevent='goToGroup'
) {{group.name}}
</template>
<script>
export default {
props: ['group'],
methods: {
goToGroup () {
if (this.group.type === 'party') {
this.$router.push({name: 'party'});
} else {
this.$router.push({name: 'guild', params: {groupId: this.group._id}});
}
},
},
};
</script>