From f05a74df724df57b33b31de1c5c1641b57913385 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 31 Oct 2017 15:36:48 -0500 Subject: [PATCH] use material-ui Table --- .../ClientApp/components/Home.tsx | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 9cf778e40..06a81c512 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -1,6 +1,14 @@ import * as React from "react"; import { RouteComponentProps } from "react-router"; import "isomorphic-fetch"; +import { + Table, + TableBody, + TableHeader, + TableHeaderColumn, + TableRow, + TableRowColumn, + } from "material-ui"; interface IFilterListsState { filterLists: IFilterList[]; @@ -11,7 +19,6 @@ export class Home extends React.Component, IFilterListsS constructor() { super(); this.state = { filterLists: [], loading: true }; - fetch("https://api.filterlists.com/v1/lists") .then(response => response.json() as Promise) .then(data => { @@ -32,22 +39,22 @@ export class Home extends React.Component, IFilterListsS } private static renderFilterListsTable(filterLists: IFilterList[]) { - return - - - - - - - - {filterLists.map(filterList => - - - - - )} - -
NameDescription
{filterList.name}{filterList.description}
; + return + + + Name + Description + + + + {filterLists.map(filterList => + + {filterList.name} + {filterList.description} + + )} + +
; } }