mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Invoices -> History
This commit is contained in:
parent
5b67e11f94
commit
17b955a815
@ -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>
|
||||
)
|
||||
|
@ -4,8 +4,8 @@
|
||||
"link": "/publish"
|
||||
},
|
||||
{
|
||||
"title": "Invoices",
|
||||
"link": "/invoices"
|
||||
"title": "History",
|
||||
"link": "/history"
|
||||
},
|
||||
{
|
||||
"title": "Faucet",
|
||||
|
@ -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>
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user