Skip to content

Instantly share code, notes, and snippets.

@ondrek
Created January 23, 2019 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ondrek/ee9ae5ac85e549878013b8cd11853f8c to your computer and use it in GitHub Desktop.
Save ondrek/ee9ae5ac85e549878013b8cd11853f8c to your computer and use it in GitHub Desktop.
export default class extends Component {
componentDidMount() {
const { router, params } = this.props
getSummary().then(({ artifacts }) => {
if (artifacts.length < 1) return router.push("/")
})
if (getOrderSecret() && !params.secretId) {
return router.push(`/order/details/${getOrderSecret()}`)
}
if (getOrderSecret() && params.secretId) {
getOrderDetails({ secretId: params.secretId }).then(res => this.setState({ res }))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment