Skip to content

Commit

Permalink
fixed the gif switching issue (fossasia#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sid911 authored and mariobehling committed Dec 23, 2019
1 parent 28fd7de commit fb4ddf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/About/Overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ class Overview extends Component {

render() {
const { gifIndex } = this.state;
const { classes } = this.props;
return (
<div>
<Container>
Expand Down Expand Up @@ -655,7 +654,11 @@ class Overview extends Component {
{buttonAttributes.map((button, index) => (
<Button
key={index}
className={classes.button}
style={
gifIndex === index
? { backgroundColor: '#4285f4', color: '#ffffff' }
: { backgroundColor: '#ffffff' }
}
variant="contained"
onClick={e => this.handleGIFChange(index)}
>
Expand All @@ -672,7 +675,6 @@ class Overview extends Component {
src={buttonAttributes[gifIndex].video}
style={gifIndex === index ? {} : { display: 'none' }}
autoPlay
loop
muted
playsinline
/>
Expand Down

0 comments on commit fb4ddf1

Please sign in to comment.