feat: add wallet

This commit is contained in:
Hasta Ragil Saputra
2019-01-06 18:21:08 +07:00
parent 21c56ad40f
commit 76eb551deb
6 changed files with 83 additions and 23 deletions

View File

@@ -44,6 +44,7 @@ import EmptyComponent from '../EmptyComponent';
import NumberFormat from 'react-number-format';
import faker from 'faker';
import { Route as RouteDOM } from 'react-router-dom'
import WalletComponent from "./WalletComponent";
faker.locale = 'id_ID';
@inject("appstate")
@@ -442,24 +443,7 @@ export default class App extends React.Component {
</ToolbarGroup>
<ToolbarGroup>
<div className={'containerWalletBar'}>
<div className={'containerVoucher'}>
<p className={'titleVoucher'}>Voucher</p>
<RouteDOM render={({ history}) => (
<p onClick={() => history.push(LINKS.WALLET)} className={'textVoucher'}>
<NumberFormat value={(500000).toFixed(2)} displayType={'text'} thousandSeparator={true} prefix={'Rp '}/>
</p>
)} />
</div>
<div className={'containerPoints'}>
<p className={'titlePoints'}>Points</p>
<RouteDOM render={({ history}) => (
<p onClick={() => history.push(LINKS.WALLET)} className={'textPoints'}>
<NumberFormat value={(15000)} displayType={'text'} thousandSeparator={true}/>
</p>
)} />
</div>
</div>
<WalletComponent/>
{window.location.pathname.split("/")[2] == "shop" ? (
<IconMenu
@@ -512,7 +496,7 @@ export default class App extends React.Component {
</List>
</IconMenu>
) : (<div/>)}
<IconMenu
anchorOrigin={{vertical: 'bottom', horizontal: 'right'}}