Current User Avatar
supabase-ui-library/current-user-avatar-nuxtjsUnverifiedBlock
Component which renders the current user's avatar.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/flamingrubberduck/supabase-studio-multi-head/master/apps/ui-library/public/r/current-user-avatar-nuxtjs.jsonSource
1<script setup lang="ts">2import { computed } from 'vue'3// @ts-ignore4import { useCurrentUserImage } from '@/composables/useCurrentUserImage'5// @ts-ignore6import { useCurrentUserName } from '@/composables/useCurrentUserName'78import Avatar from '@/components/ui/avatar/Avatar.vue'9import AvatarFallback from '@/components/ui/avatar/AvatarFallback.vue'10import AvatarImage from '@/components/ui/avatar/AvatarImage.vue'1112const { image: profileImage } = useCurrentUserImage()13const { name } = useCurrentUserName()1415const initials = computed(() => {16 if (!name.value) return ''17 return name.value18 .split(' ')19 .map(word => word[0])20 .join('')21 .toUpperCase()22})23</script>2425<template>26 <Avatar>27 <AvatarImage28 v-if="profileImage"29 :src="profileImage"30 :alt="initials"31 />32 <AvatarFallback>33 {{ initials }}34 </AvatarFallback>35 </Avatar>36</template>
What it pulls in
npm packages
Other registry items
Files it writes
More from Supabase UI Library
All 2 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Current User Avatarcurrent-user-avatar-vue | Supabase UI Library | Blocks | Unverified | 1 dep · 3 files | |
| Dropzone (File Upload) for Nuxt and Supabasedropzone-nuxtjs | Supabase UI Library | Blocks | Unverified | 3 deps · 4 files | |
| Dropzone (File Upload) for Vue and Supabasedropzone-vue | Supabase UI Library | Blocks | Unverified | 3 deps · 4 files | |
| Infinite Query Hookinfinite-query-hook | Supabase UI Library | Blocks | Unverified | 2 deps | |
| Password Based Auth flow for Nextjs and Supabasepassword-based-auth-nextjs | Supabase UI Library | Blocks | Unverified | 2 deps · 17 files | |
| Password Based Auth flow for Nuxt.js and Supabasepassword-based-auth-nuxtjs | Supabase UI Library | Blocks | Unverified | 2 deps · 12 files | |
| Password Based Auth flow for React and Supabasepassword-based-auth-react | Supabase UI Library | Blocks | Unverified | 1 dep · 5 files | |
| Password Based Auth flow for React Router and Supabasepassword-based-auth-react-router | Supabase UI Library | Blocks | Unverified | 4 deps · 11 files |
