Layout 100%, Notificações, SetupWizard

This commit is contained in:
Leonardo
2026-03-17 21:08:14 -03:00
parent 84d65e49c0
commit 66f67cd40f
77 changed files with 35823 additions and 15023 deletions
+23
View File
@@ -0,0 +1,23 @@
// src/composables/useNotifications.js
import { onMounted, onUnmounted } from 'vue'
import { supabase } from '@/lib/supabase/client'
import { useNotificationStore } from '@/stores/notificationStore'
export function useNotifications () {
const store = useNotificationStore()
onMounted(async () => {
const { data, error } = await supabase.auth.getUser()
if (error || !data?.user?.id) return
const ownerId = data.user.id
await store.load(ownerId)
store.subscribeRealtime(ownerId)
})
onUnmounted(() => {
store.unsubscribe()
})
return store
}