MCPcopy
hub / github.com/tinyplex/tinybase / CloneTable

Function CloneTable

src/ui-react-inspector/actions/tables.tsx:106–125  ·  view source on GitHub ↗
({
  onDone,
  tableId,
  store: storeOrStoreId,
}: OnDoneProp & TableProps)

Source from the content-addressed store, hash-verified

104};
105
106const CloneTable = ({
107 onDone,
108 tableId,
109 store: storeOrStoreId,
110}: OnDoneProp & TableProps) => {
111 const store = useStoreOrStoreById(storeOrStoreId)!;
112 const has = useHasTableCallback(store);
113 return (
114 <NewId
115 onDone={onDone}
116 suggestedId={getNewIdFromSuggestedId(tableId, has)}
117 has={has}
118 set={useSetTableCallback(
119 (tableId) => tableId,
120 (_, store) => store.getTable(tableId),
121 )}
122 prompt="Clone table to"
123 />
124 );
125};
126
127const DeleteTable = ({onDone, tableId, store}: OnDoneProp & TableProps) => (
128 <Delete

Callers

nothing calls this directly

Calls 5

useStoreOrStoreByIdFunction · 0.90
getNewIdFromSuggestedIdFunction · 0.90
useSetTableCallbackFunction · 0.90
useHasTableCallbackFunction · 0.70
getTableMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…