Skip to content

Commit

Permalink
cleanup sqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis committed Sep 20, 2024
1 parent 24e4593 commit 46a39a3
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ export function DataExplorerSqlite() {
const { data: deployedTables } = useDeployedTablesQuery();
const selectedTableId = searchParams.get("tableId") ?? deployedTables?.[0]?.tableId;
const deployedTable = deployedTables?.find(({ tableId }) => tableId === selectedTableId);
const columns = Object.keys(deployedTable?.schema ?? {});
const { data: rows } = useTableDataQuery({ deployedTable });
const { data } = useTableDataQuery({ deployedTable });

return (
<>
<TableSelector value={selectedTableId} deployedTables={deployedTables} />
<TablesViewer deployedTable={deployedTable} rows={rows} columns={columns} />
<TablesViewer deployedTable={deployedTable} data={data} />
</>
);
}

0 comments on commit 46a39a3

Please sign in to comment.