Skip to content
This repository was archived by the owner on Apr 12, 2023. It is now read-only.

Commit fd08bd2

Browse files
authored
Fixed React bug (#334)
1 parent 0dc0a1f commit fd08bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/components/block-content/slideshow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { imageUrlFor } from '../../lib/image-url'
55
import styles from './slideshow.module.css'
66

77
function Slideshow (props) {
8+
const [index, setIndex] = useState(0)
89
if (!props.slides) return null
910
const len = props.slides.length
10-
const [index, setIndex] = useState(0)
1111
function handlePrev () {
1212
setIndex(Math.max(index - 1, 0))
1313
}

0 commit comments

Comments
 (0)