Skip to content

Commit

Permalink
Remove unused onImageIndexChange
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Oct 5, 2023
1 parent 193629c commit 40fcf9a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/view/com/lightbox/ImageViewing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import React, {
ComponentType,
useCallback,
useRef,
useEffect,
useMemo,
useState,
} from 'react'
Expand Down Expand Up @@ -41,7 +40,6 @@ type Props = {
imageIndex: number
visible: boolean
onRequestClose: () => void
onImageIndexChange?: (imageIndex: number) => void
presentationStyle?: ModalProps['presentationStyle']
animationType?: ModalProps['animationType']
backgroundColor?: string
Expand All @@ -59,7 +57,6 @@ function ImageViewing({
imageIndex,
visible,
onRequestClose,
onImageIndexChange,
backgroundColor = DEFAULT_BG_COLOR,
HeaderComponent,
FooterComponent,
Expand All @@ -70,12 +67,6 @@ function ImageViewing({
const [headerTransform, footerTransform, toggleBarsVisible] =
useAnimatedComponents()

useEffect(() => {
if (onImageIndexChange) {
onImageIndexChange(currentImageIndex)
}
}, [currentImageIndex, onImageIndexChange])

const onZoom = useCallback(
(isScaled: boolean) => {
// @ts-ignore
Expand Down

0 comments on commit 40fcf9a

Please sign in to comment.