MCPcopy Create free account
hub / github.com/alanagoyal/docbase / fetchGroups

Function fetchGroups

components/groups-form.tsx:68–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }, [])
67
68 const fetchGroups = async () => {
69 const { data, error } = await supabase
70 .from("groups")
71 .select("*")
72 .eq("created_by", userId)
73
74 if (error) {
75 clientLogger.error('Error fetching groups', { error })
76 toast({ variant: "destructive", description: "Failed to fetch groups" })
77 } else {
78 setGroups(data || [])
79 }
80 }
81
82 const handleGroupChange = (
83 index: number,

Callers 1

GroupsDialogFunction · 0.85

Calls 1

toastFunction · 0.90

Tested by

no test coverage detected