This commit is contained in:
Marcos Rodriguez Velez 2024-08-21 23:10:16 -04:00
parent 9805e9a414
commit fbcaeed96f
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import { StyleSheet, TouchableOpacity, GestureResponderEvent } from 'react-native';
import { Icon } from '@rneui/themed';
import { useTheme } from './themes';
@ -29,7 +29,7 @@ const AddWalletButton: React.FC<AddWalletButtonProps> = ({ onPress }) => {
},
});
const onPressMenuItem = (action: string) => {
const onPressMenuItem = useCallback((action: string) => {
switch (action) {
case CommonToolTipActions.ImportWallet.id:
console.log('Import Wallet');
@ -38,7 +38,7 @@ const AddWalletButton: React.FC<AddWalletButtonProps> = ({ onPress }) => {
default:
break;
}
};
}, []);
const actions = useMemo(() => [CommonToolTipActions.ImportWallet], []);

View file

@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import { StyleSheet, TouchableOpacity } from 'react-native';
import { Icon } from '@rneui/themed';
import { useTheme } from '../themes';
@ -14,7 +14,7 @@ const SettingsButton = () => {
navigate('Settings');
};
const onPressMenuItem = (menuItem: string) => {
const onPressMenuItem = useCallback((menuItem: string) => {
switch (menuItem) {
case CommonToolTipActions.ManageWallet.id:
navigate('ManageWallets');
@ -22,7 +22,7 @@ const SettingsButton = () => {
default:
break;
}
};
}, []);
const actions = useMemo(() => [CommonToolTipActions.ManageWallet], []);
return (