Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
366a40356f
commit
2d2ee28c34
@@ -71,7 +71,7 @@ export function AppShell({ children }: { children: ReactNode }) {
|
||||
if (data) setProfile({ full_name: data.full_name || "", avatar_url: (data as any).avatar_url ?? null });
|
||||
});
|
||||
const ch = supabase
|
||||
.channel(`profile-self-${user.id}`)
|
||||
.channel(`profile-self-${user.id}-${Math.random().toString(36).slice(2)}`)
|
||||
.on(
|
||||
"postgres_changes",
|
||||
{ event: "UPDATE", schema: "public", table: "profiles", filter: `id=eq.${user.id}` },
|
||||
|
||||
@@ -72,7 +72,7 @@ export function CaseTasksTab({ caseId }: { caseId: string }) {
|
||||
useEffect(() => {
|
||||
load();
|
||||
const ch = supabase
|
||||
.channel(`case-tasks-${caseId}`)
|
||||
.channel(`case-tasks-${caseId}-${Math.random().toString(36).slice(2)}`)
|
||||
.on("postgres_changes", { event: "*", schema: "public", table: "tasks", filter: `case_id=eq.${caseId}` }, () => load())
|
||||
.on("postgres_changes", { event: "*", schema: "public", table: "task_assignees" }, () => load())
|
||||
.subscribe();
|
||||
|
||||
@@ -72,7 +72,7 @@ export function CommentThread({
|
||||
useEffect(() => {
|
||||
load();
|
||||
const ch = supabase
|
||||
.channel(`comments-${entityType}-${entityId}`)
|
||||
.channel(`comments-${entityType}-${entityId}-${Math.random().toString(36).slice(2)}`)
|
||||
.on(
|
||||
"postgres_changes",
|
||||
{ event: "*", schema: "public", table: "comments", filter: `entity_id=eq.${entityId}` },
|
||||
|
||||
@@ -153,7 +153,7 @@ export function TaskDetailPanel({
|
||||
useEffect(() => {
|
||||
if (!open || !taskId) return;
|
||||
const ch = supabase
|
||||
.channel(`task-${taskId}`)
|
||||
.channel(`task-${taskId}-${Math.random().toString(36).slice(2)}`)
|
||||
.on("postgres_changes", { event: "*", schema: "public", table: "task_comments", filter: `task_id=eq.${taskId}` }, () => load())
|
||||
.on("postgres_changes", { event: "*", schema: "public", table: "task_assignees", filter: `task_id=eq.${taskId}` }, () => load())
|
||||
.on("postgres_changes", { event: "*", schema: "public", table: "tasks", filter: `id=eq.${taskId}` }, () => load())
|
||||
|
||||
Reference in New Issue
Block a user