Fix: Move composables and components into app/ directory
- Resolve SSR error "useAuthentik is not defined" - Follow Nuxt 4 directory structure conventions - When app/ exists, all app directories must be inside it - This enables proper auto-import of composables
This commit is contained in:
20
nuxt4/app/components/auth/UserAvatar.vue
Normal file
20
nuxt4/app/components/auth/UserAvatar.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<UCard v-if="user" class="w-full">
|
||||
<div class="flex items-center gap-4">
|
||||
<UAvatar
|
||||
:src="user.avatar"
|
||||
:alt="user.name || user.username"
|
||||
size="xl"
|
||||
/>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-semibold text-lg">{{ user.name || user.username }}</h3>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">{{ user.email }}</p>
|
||||
<p class="text-xs text-gray-400 dark:text-gray-500 mt-1">ID: {{ user.uid }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { user } = useAuthentik()
|
||||
</script>
|
||||
Reference in New Issue
Block a user