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