Use router-link for the channel names

This commit is contained in:
Peter Stuifzand 2018-09-08 15:07:24 +02:00
parent cfd70999a3
commit fc30b58069

View File

@ -1,21 +1,16 @@
<template>
<div class="channel--name" @click="select(channel)">
{{ channel.name }} <span :class="{ tag: true, 'is-success': channel.unread > 0}">{{ channel.unread }}</span>
<router-link :to='"/channel/" + channel.uid'>
{{ channel.name }}
<span :class="{ tag: true, 'is-success': channel.unread > 0}">{{ channel.unread }}</span>
</router-link>
</div>
</template>
<script>
export default {
name: "Channel",
props: ['channel'],
methods: {
select(channel) {
this.$emit('channel-selected', channel)
}
}
props: ['channel']
}
</script>