Skip to content

Commit

Permalink
casted supabase channel to any
Browse files Browse the repository at this point in the history
  • Loading branch information
ayyubibrahimi committed Nov 7, 2023
1 parent 5ce8487 commit 92393f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/web/components/NewQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function NewQuery() {
return;
}

const channel = supabase.channel(`cards:id=eq.${card.id}`)
const channel = (supabase.channel(`cards:id=eq.${card.id}`) as any)
.on('postgres_changes', {
event: "INSERT",
schema: "public",
Expand All @@ -132,11 +132,12 @@ export default function NewQuery() {
}
})
.subscribe();

return () => {
channel.unsubscribe();
};
}, [card]);
}, [card]);


const submitQuery = async (e?: React.FormEvent<HTMLFormElement>) => {
e?.preventDefault();
Expand Down

0 comments on commit 92393f1

Please sign in to comment.