({
store,
storeId,
s,
}: TablesProps & {readonly storeId?: Id} & StoreProp)
| 110 | }; |
| 111 | |
| 112 | export 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 | }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…