This commit is contained in:
2025-02-08 23:45:43 -08:00
parent 89eadbd477
commit abe584b1c1
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
'use client';
export default function
useEffect(() => {
const daysChannel = supabase.channel('days')
.on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'days' }, (payload) => {
setDay(payload.new);
}).subscribe();
return () => {
daysChannel.unsubscribe();
}
}, [supabase])