From 7a5051de048525a64720460eb49a0ae5ce98510e Mon Sep 17 00:00:00 2001 From: Swetha K Date: Mon, 6 Jan 2025 16:30:33 +0530 Subject: [PATCH] MOSIP-38029: UI Development - View of linked devices for a SBI Signed-off-by: Swetha K --- .../deviceProviderServices/ViewAdminDeviceDetails.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js index 614e5f326..1660df925 100644 --- a/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js +++ b/pmp-revamp-ui/src/pages/admin/deviceProviderServices/ViewAdminDeviceDetails.js @@ -23,19 +23,23 @@ function ViewAdminDeviceDetails() { setDeviceDetails(selectedDevice); }, []); - const moveToDevicesList = () => { + const backToDevicesList = () => { if(deviceDetails.isViewLinkedDevices) { - navigate(`/partnermanagement/admin/device-provider-services/devices-list?sbiId=${deviceDetails.sbiId}&sbiVersion=${deviceDetails.sbiVersion}`); + return `/partnermanagement/admin/device-provider-services/devices-list?sbiId=${deviceDetails.sbiId}&sbiVersion=${deviceDetails.sbiVersion}`; } else { - navigate('/partnermanagement/admin/device-provider-services/devices-list'); + return '/partnermanagement/admin/device-provider-services/devices-list'; } + } + + const moveToDevicesList = () => { + navigate(backToDevicesList()); }; return (
- + <Title title={'viewDeviceDetails.viewDeviceDetails'} subTitle='devicesList.listOfDevices' backLink={backToDevicesList()}/> </div> {unexpectedError && (