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

Function TablesView

src/ui-react-inspector/TablesView.tsx:112–144  ·  view source on GitHub ↗
({
  store,
  storeId,
  s,
}: TablesProps & {readonly storeId?: Id} & StoreProp)

Source from the content-addressed store, hash-verified

110};
111
112export const TablesView = ({
113 store,
114 storeId,
115 s,
116}: TablesProps & {readonly storeId?: Id} & StoreProp) => {
117 const uniqueId = getUniqueId('ts', storeId);
118 const [editable, handleEditable] = useEditable(uniqueId, s);
119 const tableIds = useTableIds(store);
120 return (
121 <Details
122 uniqueId={uniqueId}
123 title={TABLES}
124 editable={editable}
125 handleEditable={handleEditable}
126 s={s}
127 >
128 {arrayIsEmpty(tableIds) ? (
129 <p>No tables.</p>
130 ) : (
131 sortedIdsMap(tableIds, (tableId) => (
132 <TableView
133 store={store}
134 storeId={storeId}
135 tableId={tableId}
136 s={s}
137 key={tableId}
138 />
139 ))
140 )}
141 {editable ? <TablesActions store={store} /> : null}
142 </Details>
143 );
144};

Callers

nothing calls this directly

Calls 5

getUniqueIdFunction · 0.90
useEditableFunction · 0.90
useTableIdsFunction · 0.90
arrayIsEmptyFunction · 0.90
sortedIdsMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…