diff --git a/app/layouts/default.vue b/app/layouts/default.vue index dd858c3..25d3ea3 100755 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -2,6 +2,7 @@ import { computed } from 'vue' import { storeToRefs } from 'pinia' import type { NavigationMenuItem } from '@nuxt/ui' +import { useFavoritesStore } from '~/stores/favorites' const { locale, locales, setLocale } = useI18n() @@ -10,6 +11,9 @@ const t = $i18n.t; const open = ref(false) +const favorites = useFavoritesStore() +const { total: favTotal } = storeToRefs(favorites) + const links = [[{ label: t('nav.bible_studies'), icon: 'ph:books', @@ -41,6 +45,12 @@ const links = [[{ icon: 'ph:chalkboard-teacher', to: '/ebn', onSelect: () => { open.value = false } +}, { + label: 'Mi lista', + icon: 'i-lucide-bookmark', + to: '/favoritos', + badge: favTotal.value > 0 ? String(favTotal.value) : undefined, + onSelect: () => { open.value = false } }]] satisfies NavigationMenuItem[][] @@ -56,8 +66,8 @@ const links = [[{ class="bg-elevated/25 bg-gradient-to-tr from-blue-100 to-white" :ui="{ footer: 'lg:border-t lg:border-default' }" > -