MCPcopy Index your code
hub / github.com/tinyplex/tinybase / AddValue

Function AddValue

src/ui-react-inspector/actions/values.tsx:32–48  ·  view source on GitHub ↗
({onDone, store}: OnDoneProp & ValuesProps)

Source from the content-addressed store, hash-verified

30};
31
32const AddValue = ({onDone, store}: OnDoneProp & ValuesProps) => {
33 const has = useHasValueCallback(store);
34 return (
35 <NewId
36 onDone={onDone}
37 suggestedId={getNewIdFromSuggestedId('value', has)}
38 has={has}
39 set={useSetValueCallback(
40 (newId: Id) => newId,
41 () => '',
42 [],
43 store,
44 )}
45 prompt="Add value"
46 />
47 );
48};
49
50const DeleteValues = ({onDone, store}: OnDoneProp & ValuesProps) => (
51 <Delete

Callers

nothing calls this directly

Calls 3

getNewIdFromSuggestedIdFunction · 0.90
useSetValueCallbackFunction · 0.90
useHasValueCallbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…