Remove unused onImageIndexChange
This commit is contained in:
@@ -12,7 +12,6 @@ import React, {
|
||||
ComponentType,
|
||||
useCallback,
|
||||
useRef,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react'
|
||||
@@ -41,7 +40,6 @@ type Props = {
|
||||
imageIndex: number
|
||||
visible: boolean
|
||||
onRequestClose: () => void
|
||||
onImageIndexChange?: (imageIndex: number) => void
|
||||
presentationStyle?: ModalProps['presentationStyle']
|
||||
animationType?: ModalProps['animationType']
|
||||
backgroundColor?: string
|
||||
@@ -59,7 +57,6 @@ function ImageViewing({
|
||||
imageIndex,
|
||||
visible,
|
||||
onRequestClose,
|
||||
onImageIndexChange,
|
||||
backgroundColor = DEFAULT_BG_COLOR,
|
||||
HeaderComponent,
|
||||
FooterComponent,
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user