Refactor sidebar

This commit is contained in:
Jack Hadrill
2022-03-20 00:12:03 +00:00
parent b1977447a2
commit c6fb1528ea
12 changed files with 167 additions and 73 deletions

View File

@@ -0,0 +1,22 @@
<template>
<div class="d-flex flex-column">
<User :user="self" />
<div v-for="user in users" :key="user.id" class="d-flex flex-row align-items-center">
<User :user="user" />
</div>
</div>
</template>
<script setup>
import { computed } from 'vue'
import { useUserStore } from '../../stores/userStore'
import User from './User.vue'
const props = defineProps(['channel'])
const channelId = computed(() => { return props.channel.id })
const userStore = useUserStore()
const users = computed(() => { return userStore.getUsersByChannelId(channelId.value) })
const self = userStore.getSelf()
</script>