1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Invoices -> History

This commit is contained in:
Matthias Kretschmann 2019-03-25 16:42:37 +01:00
parent 5b67e11f94
commit 17b955a815
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 10 additions and 17 deletions

View File

@ -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 = () => (
<Route component={Search} path="/search" />
<Route component={Details} path="/asset/:did" />
<Route component={Faucet} path="/faucet" />
<Route component={Invoices} path="/invoices" />
<Route component={History} path="/history" />
<Route component={NotFound} />
</Switch>
)

View File

@ -4,8 +4,8 @@
"link": "/publish"
},
{
"title": "Invoices",
"link": "/invoices"
"title": "History",
"link": "/history"
},
{
"title": "Faucet",

View File

@ -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 ? (
<div className={styles.results}>
{this.state.results
.filter(asset => !!asset)
.map((asset, index) => (
<Asset key={index} asset={asset} />
))}
</div>
this.state.results
.filter(asset => !!asset)
.map((asset, index) => (
<Asset key={index} asset={asset} list />
))
) : (
<div>No invoices yet</div>
)
public render() {
return (
<Route title="Your invoices" wide>
{this.renderResults()}
</Route>
)
return <Route title="History">{this.renderResults()}</Route>
}
}