aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/TableBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-06 00:14:24 -0400
committerbobzel <zzzman@gmail.com>2023-04-06 00:14:24 -0400
commita8343cad405a146fdff8fc2d66ef41fdaefb8bda (patch)
tree853c9b24f6bec83e46240fd9c39e9487e8eb6650 /src/client/views/nodes/DataVizBox/components/TableBox.tsx
parent99fba6d6e99da0154d40d2e3e87e120d8e6f2810 (diff)
more simplification/cleanup of dataviz
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/TableBox.tsx31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index dfa8262d8..28114036f 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -1,16 +1,12 @@
-import { action, computed, observable } from "mobx";
-import { observer } from "mobx-react";
-import * as React from "react";
+import { action, computed, observable } from 'mobx';
+import { observer } from 'mobx-react';
+import * as React from 'react';
interface TableBoxProps {
- pairs: {x: number, y:number}[]
+ pairs: { x: number; y: number }[];
}
-
export class TableBox extends React.Component<TableBoxProps> {
-
-
-
render() {
return (
<div className="table-container">
@@ -22,16 +18,17 @@ export class TableBox extends React.Component<TableBoxProps> {
</tr>
</thead>
<tbody>
- {this.props.pairs.map(p => {
- return (<tr className="table-row">
- <td>{p.x}</td>
- <td>{p.y}</td>
- </tr>)
- })}
+ {this.props.pairs?.map(p => {
+ return (
+ <tr className="table-row">
+ <td>{p.x}</td>
+ <td>{p.y}</td>
+ </tr>
+ );
+ })}
</tbody>
</table>
</div>
- )
+ );
}
-
-} \ No newline at end of file
+}