From d34a39d93c65e2850037e93f136aa5aba7e6a36e Mon Sep 17 00:00:00 2001 From: yashmantri Date: Wed, 28 Aug 2024 19:45:45 +0530 Subject: [PATCH] TP-79857 | Allocation on geolocation --- src/screens/addressGeolocation/index.tsx | 11 ++--------- src/screens/caseDetails/ViewAddressSection.tsx | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/screens/addressGeolocation/index.tsx b/src/screens/addressGeolocation/index.tsx index 7232b01b..d6779a84 100644 --- a/src/screens/addressGeolocation/index.tsx +++ b/src/screens/addressGeolocation/index.tsx @@ -39,12 +39,7 @@ const PAGE_TITLE = 'All addresses'; const AddressGeolocation: React.FC = ({ route: routeParams }) => { const { - params: { - loanAccountNumber, - customerReferenceId, - caseId, - tab = AddressGeolocationTabEnum.ADDRESS, - }, + params: { loanAccountNumber, customerReferenceId, caseId, tab }, } = routeParams; const { addressGeolocation, isLoading } = useAppSelector((state: RootState) => ({ @@ -102,9 +97,7 @@ const AddressGeolocation: React.FC = ({ route: routeParams }, []); useEffect(() => { - if (tab) { - setSelectedTab(tab); - } + setSelectedTab(tab ?? AddressGeolocationTabEnum.ADDRESS); }, [tab]); const handleTabChange = (tab: string) => { diff --git a/src/screens/caseDetails/ViewAddressSection.tsx b/src/screens/caseDetails/ViewAddressSection.tsx index d7807e80..7b68d9fe 100644 --- a/src/screens/caseDetails/ViewAddressSection.tsx +++ b/src/screens/caseDetails/ViewAddressSection.tsx @@ -22,9 +22,6 @@ const ViewAddressSection = ({ caseId }: IViewAddressSection) => { const { addressString, loanAccountNumber, customerReferenceId, addressStringType } = caseDetail; const getTabName = () => { - if (addressStringType === AddressTabType.META_ADDRESS) { - return AddressGeolocationTabEnum.ADDRESS; - } if (addressStringType === AddressTabType.GEO_LOCATION) { return AddressGeolocationTabEnum.GEOLOCATION; }