TP-79857 | Allocation on geolocation

This commit is contained in:
yashmantri
2024-08-28 19:45:45 +05:30
parent 7628328575
commit d34a39d93c
2 changed files with 2 additions and 12 deletions

View File

@@ -39,12 +39,7 @@ const PAGE_TITLE = 'All addresses';
const AddressGeolocation: React.FC<IAddressGeolocation> = ({ 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<IAddressGeolocation> = ({ route: routeParams
}, []);
useEffect(() => {
if (tab) {
setSelectedTab(tab);
}
setSelectedTab(tab ?? AddressGeolocationTabEnum.ADDRESS);
}, [tab]);
const handleTabChange = (tab: string) => {

View File

@@ -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;
}