mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-13 19:16:52 +01:00
Update WalletsCarousel.tsx
This commit is contained in:
parent
2bb7b0c53f
commit
3423730a41
1 changed files with 2 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
|
||||
import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
|
||||
import {
|
||||
Animated,
|
||||
FlatList,
|
||||
|
@ -187,8 +187,7 @@ export const WalletCarouselItem: React.FC<WalletCarouselItemProps> = React.memo(
|
|||
const itemWidth = width * 0.82 > 375 ? 375 : width * 0.82;
|
||||
const { isLargeScreen } = useIsLargeScreen();
|
||||
|
||||
// Memoize springConfig for stable dependency
|
||||
const springConfig = React.useMemo(() => ({ useNativeDriver: true, tension: 100 }), []);
|
||||
const springConfig = useMemo(() => ({ useNativeDriver: true, tension: 100 }), []);
|
||||
const animateScale = useCallback(
|
||||
(toValue: number, callback?: () => void) => {
|
||||
Animated.spring(scaleValue, { toValue, ...springConfig }).start(callback);
|
||||
|
|
Loading…
Add table
Reference in a new issue