start adding payment
This commit is contained in:
@@ -56,6 +56,7 @@ const FeatureCarousel = ({
|
||||
activeIndex,
|
||||
onActiveIndexChange,
|
||||
backgroundImage,
|
||||
isFocused,
|
||||
}) => {
|
||||
const stageStates = useMemo(() => {
|
||||
if (stageStatesProp) {
|
||||
@@ -223,6 +224,23 @@ const FeatureCarousel = ({
|
||||
scrollToIndex(activeIndexRef.current, false);
|
||||
}, [carouselItems.length, isWeb, itemHeight, scrollToIndex]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isWeb || !isFocused) {
|
||||
return;
|
||||
}
|
||||
if (!itemHeight) {
|
||||
return;
|
||||
}
|
||||
clearPendingAlignment();
|
||||
scrollToIndex(activeIndexRef.current, false);
|
||||
}, [
|
||||
clearPendingAlignment,
|
||||
isFocused,
|
||||
isWeb,
|
||||
itemHeight,
|
||||
scrollToIndex,
|
||||
]);
|
||||
|
||||
const alignToOffset = useCallback(
|
||||
(offset, layoutHeight, options = {}) => {
|
||||
const { forceSnap = false } = options || {};
|
||||
|
||||
Reference in New Issue
Block a user