From 430e4e34ad0715e58e3cd29f13315d06a9e70b91 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Sat, 4 May 2024 20:24:36 -0400 Subject: [PATCH] REF: Load WalletLists faster with useEffet --- screen/wallets/WalletsList.tsx | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/screen/wallets/WalletsList.tsx b/screen/wallets/WalletsList.tsx index c60d22ab0..05d2d5696 100644 --- a/screen/wallets/WalletsList.tsx +++ b/screen/wallets/WalletsList.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useLayoutEffect, useReducer, useRef } from 'react'; +import React, { useCallback, useEffect, useReducer, useRef } from 'react'; import { View, TouchableOpacity, @@ -166,7 +166,7 @@ const WalletsList: React.FC = () => { } }; - useLayoutEffect(() => { + useEffect(() => { setOptions({ navigationBarColor: colors.navigationBarColor, headerShown: !isDesktop, @@ -176,26 +176,14 @@ const WalletsList: React.FC = () => { // eslint-disable-next-line react/no-unstable-nested-components headerRight: () => I18nManager.isRTL ? null : ( - + ), // eslint-disable-next-line react/no-unstable-nested-components headerLeft: () => I18nManager.isRTL ? ( - + ) : null, @@ -472,10 +460,6 @@ const styles = StyleSheet.create({ walletsListWrapper: { flex: 1, }, - headerTouch: { - height: 48, - paddingVertical: 10, - }, listHeaderBack: { flexDirection: 'row', justifyContent: 'space-between',