From 17b955a8159c05dad9cffc1dd2178c417ccfdacf Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 25 Mar 2019 16:42:37 +0100 Subject: [PATCH] Invoices -> History --- client/src/Routes.tsx | 4 ++-- client/src/data/menu.json | 4 ++-- .../src/routes/{Invoices.tsx => History.tsx} | 19 ++++++------------- 3 files changed, 10 insertions(+), 17 deletions(-) rename client/src/routes/{Invoices.tsx => History.tsx} (77%) diff --git a/client/src/Routes.tsx b/client/src/Routes.tsx index 3881062..5f4e33d 100644 --- a/client/src/Routes.tsx +++ b/client/src/Routes.tsx @@ -8,7 +8,7 @@ import NotFound from './routes/NotFound' import Publish from './routes/Publish/' import Search from './routes/Search' import Faucet from './routes/Faucet' -import Invoices from './routes/Invoices' +import History from './routes/History' import Styleguide from './routes/Styleguide' const Routes = () => ( @@ -20,7 +20,7 @@ const Routes = () => ( - + ) diff --git a/client/src/data/menu.json b/client/src/data/menu.json index 9169df2..9f1f822 100644 --- a/client/src/data/menu.json +++ b/client/src/data/menu.json @@ -4,8 +4,8 @@ "link": "/publish" }, { - "title": "Invoices", - "link": "/invoices" + "title": "History", + "link": "/history" }, { "title": "Faucet", diff --git a/client/src/routes/Invoices.tsx b/client/src/routes/History.tsx similarity index 77% rename from client/src/routes/Invoices.tsx rename to client/src/routes/History.tsx index 95d01e7..66ac858 100644 --- a/client/src/routes/Invoices.tsx +++ b/client/src/routes/History.tsx @@ -3,7 +3,6 @@ import Route from '../components/templates/Route' import { User } from '../context/User' import Asset from '../components/molecules/Asset' import { Logger } from '@oceanprotocol/squid' -import styles from './Search.module.scss' interface InvoicesState { results: any[] @@ -40,23 +39,17 @@ export default class Invoices extends Component<{}, InvoicesState> { public renderResults = () => this.state.results.length ? ( -
- {this.state.results - .filter(asset => !!asset) - .map((asset, index) => ( - - ))} -
+ this.state.results + .filter(asset => !!asset) + .map((asset, index) => ( + + )) ) : (
No invoices yet
) public render() { - return ( - - {this.renderResults()} - - ) + return {this.renderResults()} } }