MCPcopy Create free account
hub / github.com/FeatureProbe/FeatureProbe / handleAdd

Function handleAdd

ui/src/pages/toggle/hooks.tsx:12–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 const [variations, saveVariations] = useState<IVariation[]>([]);
11
12 const handleAdd = () => {
13 const name = getVariationName(variations);
14
15 variations.push({
16 id: uuidv4(),
17 value: '',
18 name,
19 description: '',
20 });
21 saveVariations([...variations]);
22 };
23
24 const handleDelete = (index: number) => {
25 variations.splice(index, 1);

Callers 2

VariationsFunction · 0.50
ServeFunction · 0.50

Calls 2

getVariationNameFunction · 0.90
pushMethod · 0.65

Tested by

no test coverage detected