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:
34
nuxt4/app/components/auth/ActionButtons.vue
Normal file
34
nuxt4/app/components/auth/ActionButtons.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<UCard class="w-full">
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<!-- Botón de perfil -->
|
||||
<UButton
|
||||
color="primary"
|
||||
size="lg"
|
||||
@click="goToProfile"
|
||||
>
|
||||
<template #leading>
|
||||
<UIcon name="i-heroicons-user-circle" />
|
||||
</template>
|
||||
Ver Perfil
|
||||
</UButton>
|
||||
|
||||
<!-- Botón de logout -->
|
||||
<UButton
|
||||
color="error"
|
||||
size="lg"
|
||||
variant="soft"
|
||||
@click="logout"
|
||||
>
|
||||
<template #leading>
|
||||
<UIcon name="i-heroicons-arrow-right-on-rectangle" />
|
||||
</template>
|
||||
Cerrar Sesión
|
||||
</UButton>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { logout, goToProfile } = useAuthentik()
|
||||
</script>
|
||||
Reference in New Issue
Block a user