Newer
Older
navi-1 / webclient / src / components / ui / ProfileBadge.vue
<template>
  <GnBadge v-if="profile" variant="primary">
    <i class="ph ph-user-circle"></i>
    {{ profile.name }}
  </GnBadge>
</template>

<script setup>
import { computed } from 'vue'
import { useProfilesStore } from '@/stores/profiles.js'

const props = defineProps({
  profileId: { type: String, default: null }
})

const profilesStore = useProfilesStore()
const profile = computed(() => props.profileId ? profilesStore.getProfile(props.profileId) : null)
</script>