From 69b415c7323796af08e0e41b641ecb3a217bda8c Mon Sep 17 00:00:00 2001 From: Atanu Das Date: Fri, 24 Jul 2026 18:03:52 +0530 Subject: [PATCH] feat(fixed):bankdetails --- .../screens/bankDetailsScreen/bankDetailsScreen.tsx | 11 ++++++----- app/features/screens/profileScreen/profileScreen.tsx | 10 +++++----- app/navigation/bottomTabNavigator.tsx | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/features/screens/bankDetailsScreen/bankDetailsScreen.tsx b/app/features/screens/bankDetailsScreen/bankDetailsScreen.tsx index c7909c6..1746260 100644 --- a/app/features/screens/bankDetailsScreen/bankDetailsScreen.tsx +++ b/app/features/screens/bankDetailsScreen/bankDetailsScreen.tsx @@ -9,7 +9,7 @@ import { import { useAppTheme } from '@theme'; import { ScreenHeader } from '@components'; import { WalletIcon, CheckCircleIcon, ClipboardIcon } from '@icons'; -import { useNavigation } from '@react-navigation/native'; +import { useNavigation, useIsFocused } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { AppStackParamList } from '@navigation/navigationTypes'; import { getStyles } from './bankDetailsScreen.styles'; @@ -42,7 +42,7 @@ export const BankDetailsScreen = () => { const navigation = useNavigation>(); const dispatch = useAppDispatch(); - + const isFocused = useIsFocused(); // Replace this state with Redux selector when wiring real API // const [accounts] = useState(bankAccounts); @@ -50,9 +50,10 @@ export const BankDetailsScreen = () => { // console.log('-------'); useEffect(() => { - dispatch(fetchBankAccounts()); - // console.log('object') - }, [dispatch]); + if (isFocused) { + dispatch(fetchBankAccounts()); + } + }, [dispatch, isFocused]); const { bankAccounts, isLoading, error } = useAppSelector( state => state.addBankDetails, diff --git a/app/features/screens/profileScreen/profileScreen.tsx b/app/features/screens/profileScreen/profileScreen.tsx index 6c10c7d..be7d3a5 100644 --- a/app/features/screens/profileScreen/profileScreen.tsx +++ b/app/features/screens/profileScreen/profileScreen.tsx @@ -36,11 +36,11 @@ export const ProfileScreen: React.FC = () => { icon: , route: RouteNames.BankDetails, }, - { - id: 'emergency', - title: 'Emergency Contact', - icon: , - }, + // { + // id: 'emergency', + // title: 'Emergency Contact', + // icon: , + // }, { id: 'settings', title: 'App Settings', diff --git a/app/navigation/bottomTabNavigator.tsx b/app/navigation/bottomTabNavigator.tsx index cb02634..daec6ac 100644 --- a/app/navigation/bottomTabNavigator.tsx +++ b/app/navigation/bottomTabNavigator.tsx @@ -82,11 +82,11 @@ const BottomTabNavigator: React.FC = () => { options={{ tabBarLabel: 'Jobs' }} /> - + /> */}