aboutsummaryrefslogtreecommitdiff
path: root/src/client/ClientRecommender.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-08-09 17:04:25 -0400
committerab <abdullah_ahmed@brown.edu>2019-08-09 17:04:25 -0400
commitb8ab5a823ae22b021c09dfd713b77211a51b3eae (patch)
treef6c6def42f40b6c9e92562ad56d3c0e515cb94e1 /src/client/ClientRecommender.tsx
parent116f218c2eeec377fb465027bcfaa7521d9af492 (diff)
idk man
Diffstat (limited to 'src/client/ClientRecommender.tsx')
-rw-r--r--src/client/ClientRecommender.tsx17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/client/ClientRecommender.tsx b/src/client/ClientRecommender.tsx
index 0793f0887..ddaa8a7fc 100644
--- a/src/client/ClientRecommender.tsx
+++ b/src/client/ClientRecommender.tsx
@@ -7,6 +7,7 @@ import { observer } from "mobx-react";
import { observable, action, computed, reaction } from "mobx";
var assert = require('assert');
import "./ClientRecommender.scss";
+import { JSXElement } from "babel-types";
export interface RecommenderProps {
title: string;
@@ -131,22 +132,24 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
@computed
private get generateRows() {
const n = this.corr_matrix.length;
- let rows: React.ReactElement[] = [];
+ let rows: JSX.Element[] = [];
for (let i = 0; i < n; i++) {
- let children: React.ReactElement[] = [];
+ let children: JSX.Element[] = [];
for (let j = 0; j < n; j++) {
- let cell = React.createElement("td", this.corr_matrix[i][j]);
+ //let cell = React.createElement("td", this.corr_matrix[i][j]);
+ let cell = <td>{this.corr_matrix[i][j].toFixed(4)}</td>;
children.push(cell);
}
- let row = React.createElement("tr", { children: children });
+ //let row = React.createElement("tr", { children: children, key: i });
+ let row = <tr>{children}</tr>;
rows.push(row);
}
return rows;
}
render() {
- return (<div>
- <h3>{this.props.title ? this.props.title : "hello"}</h3>
+ return (<div className="wrapper">
+ <h3 >{this.props.title ? this.props.title : "hello"}</h3>
{/* <table className="space" >
<tbody>
<tr key="1">
@@ -159,7 +162,7 @@ export class ClientRecommender extends React.Component<RecommenderProps> {
</tr>
</tbody>
</table> */}
- <table>
+ <table className="space">
<tbody>
{this.generateRows}
</tbody>