Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nnbaokhang committed May 4, 2020
2 parents 6015bce + 7e73bee commit f518bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Slide/SlideProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ class SlideProfile extends React.Component {
this.setState({index: this.state.index - 1})
}
else{
alert("That the end of picture")
this.setState({index: this.state.userProfile.length - 1})
}
}
else if(e.clientX > outerElement){
if(this.state.index < this.state.userProfile.length -1) {
this.setState({index: this.state.index + 1})
}
else{
alert("That the end of picture")
this.setState({index: 0})
}
}
}
Expand Down

0 comments on commit f518bd1

Please sign in to comment.