fix: moving between route

This commit is contained in:
Rifqy Zacky Ariadhy 2019-01-03 20:23:43 +07:00
parent a594c25c0c
commit aa486bfb0d

View File

@ -14,6 +14,7 @@ import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back';
import Search from 'material-ui/svg-icons/action/search';
import Timer from 'react-compound-timer';
import {LINKS} from "../../../routes";
import {Route} from "react-router-dom";
@inject('appstate')
@observer
@ -78,14 +79,12 @@ export default class VerifyVouchers extends React.Component {
</div>
<div className="row">
<div style={{display:'flex',justifyContent:'flex-end'}}>
<Button type="danger" onClick={() => {
this.props.history.goBack()
console.log('batal');
}}>Batal</Button>
<Button type="primary" style={{marginLeft:10}} onClick={() => {
this.props.history.push(LINKS.CHECKOUT_VOUCHERS);
console.log('checkout');
}}>OK</Button>
<Route render={({ history}) => (
<Button type="danger" onClick={() => history.goBack()}>Batal</Button>
)} />
<Route render={({ history}) => (
<Button type="primary" style={{marginLeft:10}} onClick={() => history.push(LINKS.CHECKOUT_VOUCHERS)}>OK</Button>
)} />
</div>
</div>
</Card>