Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit f9b6815

Browse files
committed
fixing tables
1 parent 3196011 commit f9b6815

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

app/browse.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function Browse(props: BrowseProps) {
5353
</Select>
5454
)}
5555
</div>
56-
<div className="mt-3 h-[420px] overflow-auto">
56+
<div className="mt-2 h-[420px] overflow-auto">
5757
{selectedTable && records[selectedTable] && (
5858
<Table>
5959
<TableHeader>
@@ -70,8 +70,11 @@ export default function Browse(props: BrowseProps) {
7070
<TableRow key={rowIndex}>
7171
{Object.keys(records[selectedTable]).map(
7272
(column, columnIndex) => (
73-
<TableCell key={columnIndex}>
74-
{records[selectedTable][column][rowIndex]}
73+
<TableCell
74+
key={columnIndex}
75+
className="max-w-[150px] truncate hover:max-w-full"
76+
>
77+
<span>{records[selectedTable][column][rowIndex]}</span>
7578
</TableCell>
7679
)
7780
)}

app/execute.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,22 @@ export default function ExecuteSQL({ table }: { table: string }) {
5656
{typeof result === "string" ? (
5757
<p>{result}</p>
5858
) : result instanceof Array ? (
59-
<Table className="table-auto">
59+
<Table>
6060
<TableHeader>
6161
<TableRow>
6262
{Object.keys(result[0]).map((key) => (
63-
<TableHead key={key} className="border px-4 py-2">
64-
{key}
65-
</TableHead>
63+
<TableHead key={key}>{key}</TableHead>
6664
))}
6765
</TableRow>
6866
</TableHeader>
6967
<TableBody>
7068
{result.map((row, index) => (
7169
<TableRow key={index}>
7270
{Object.values(row).map((value, index) => (
73-
<TableCell key={index} className="border px-4 py-2">
71+
<TableCell
72+
key={index}
73+
className="max-w-[150px] truncate hover:max-w-full"
74+
>
7475
{value}
7576
</TableCell>
7677
))}

0 commit comments

Comments
 (0)