(
props: TablesProps & {readonly storeId?: Id} & StoreProp,
)
| 694 | }; |
| 695 | |
| 696 | const 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 | |
| 730 | const StoreView = (props: {readonly storeId?: Id} & StoreProp) => { |
| 731 | const store = useStore(props.storeId); |
nothing calls this directly
no test coverage detected
searching dependent graphs…