Correcao Sidebar Classico e Rail, Correcao Layout, Ajuste de Breakpoint para Tailwind, Ajuste AppTopbar, Ajuste Menu PopOver, Recriado Paleta de Cores, Inserido algumas animações leves, Reajuste Cor items NOVOS da tabela, Drawer Ajuda Corrigido no Logout, Whatsapp, sms, email, recursos extras
This commit is contained in:
@@ -14,25 +14,25 @@
|
||||
| © 2026 — Todos os direitos reservados
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
import { onMounted, onUnmounted } from 'vue'
|
||||
import { supabase } from '@/lib/supabase/client'
|
||||
import { useNotificationStore } from '@/stores/notificationStore'
|
||||
import { onMounted, onUnmounted } from 'vue';
|
||||
import { supabase } from '@/lib/supabase/client';
|
||||
import { useNotificationStore } from '@/stores/notificationStore';
|
||||
|
||||
export function useNotifications () {
|
||||
const store = useNotificationStore()
|
||||
export function useNotifications() {
|
||||
const store = useNotificationStore();
|
||||
|
||||
onMounted(async () => {
|
||||
const { data, error } = await supabase.auth.getUser()
|
||||
if (error || !data?.user?.id) return
|
||||
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)
|
||||
})
|
||||
const ownerId = data.user.id;
|
||||
await store.load(ownerId);
|
||||
store.subscribeRealtime(ownerId);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
store.unsubscribe()
|
||||
})
|
||||
onUnmounted(() => {
|
||||
store.unsubscribe();
|
||||
});
|
||||
|
||||
return store
|
||||
return store;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user