()
| 105 | } |
| 106 | |
| 107 | const handleAddGroup = async () => { |
| 108 | const newColor = getColorForGroup(groups.length) |
| 109 | const { data, error } = await supabase |
| 110 | .from("groups") |
| 111 | .insert({ name: "", color: newColor, created_by: userId }) |
| 112 | .select() |
| 113 | |
| 114 | if (error) { |
| 115 | clientLogger.error('Error adding group', { error }) |
| 116 | } else if (data) { |
| 117 | setGroups([...groups, data[0]]) |
| 118 | setNewGroupId(data[0].id) |
| 119 | setHasChanges(true) |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | const handleColorChange = (id: string, color: HslColor) => { |
| 124 | const hslString = `hsl(${color.h}, ${color.s}%, ${color.l}%)` |
nothing calls this directly
no test coverage detected