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

Function TablesView

src/ui-solid-inspector/index.tsx:696–728  ·  view source on GitHub ↗
(
  props: TablesProps & {readonly storeId?: Id} & StoreProp,
)

Source from the content-addressed store, hash-verified

694};
695
696const TablesView = (
697 props: TablesProps & {readonly storeId?: Id} & StoreProp,
698) => {
699 const uniqueId = getUniqueId('ts', props.storeId);
700 const [editable, handleEditable] = useEditable(uniqueId, props.s);
701 const tableIds = useTableIds(props.store);
702 return Details({
703 uniqueId,
704 title: TABLES,
705 editable,
706 handleEditable,
707 s: props.s,
708 get children() {
709 return (
710 <>
711 {arrayIsEmpty(tableIds()) ? (
712 <p>No tables.</p>
713 ) : (
714 sortedIdsMap(tableIds(), (tableId) => (
715 <TableView
716 store={props.store}
717 storeId={props.storeId}
718 tableId={tableId}
719 s={props.s}
720 />
721 ))
722 )}
723 {editable() ? <TablesActions store={props.store} /> : EMPTY_STRING}
724 </>
725 );
726 },
727 });
728};
729
730const StoreView = (props: {readonly storeId?: Id} & StoreProp) => {
731 const store = useStore(props.storeId);

Callers

nothing calls this directly

Calls 4

getUniqueIdFunction · 0.90
useTableIdsFunction · 0.90
useEditableFunction · 0.70
DetailsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…