Skip to content

Commit

Permalink
Add timeout timer to close error message after five seconds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason00111 committed Jan 17, 2017
1 parent dcba47e commit b470a35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions browser/components/molecules/PendingPrrrs/index.js
Expand Up @@ -28,9 +28,16 @@ export default class PendingPrrrs extends Component {
console.warn('Claim Error')
console.error(error)
this.setState({error})
this.startErrorTimeout()
})
}

startErrorTimeout() {
window.setTimeout(() => {
this.setState({error: null})
}, 5000)
}

renderAdditionalHeaders(){
return [
<th key="actions">Actions</th>,
Expand Down

0 comments on commit b470a35

Please sign in to comment.