mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
Update ManageWalletsListItem.tsx
This commit is contained in:
parent
4e480b20c4
commit
983034c788
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { View, StyleSheet, ViewStyle, TouchableOpacity, ActivityIndicator } from 'react-native';
|
||||
import { Icon, ListItem } from '@rneui/base';
|
||||
import { ExtendedTransaction, LightningTransaction, TWallet } from '../class/wallets/types';
|
||||
@ -88,13 +88,13 @@ const ManageWalletsListItem: React.FC<ManageWalletsListItemProps> = ({
|
||||
const { colors } = useTheme();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const onPress = () => {
|
||||
const onPress = useCallback(() => {
|
||||
if (item.type === ItemType.WalletSection) {
|
||||
setIsLoading(true);
|
||||
navigateToWallet(item.data);
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
}, [item, navigateToWallet]);
|
||||
|
||||
const handleLeftPress = (reset: () => void) => {
|
||||
handleToggleHideBalance(item.data as TWallet);
|
||||
|
Loading…
Reference in New Issue
Block a user