From 5154b5ef3fa750bae1bd239d2dfcb23afb63ab01 Mon Sep 17 00:00:00 2001 From: kokal33 Date: Wed, 10 Jan 2024 16:12:45 +0100 Subject: [PATCH] Additional checks: address and client, if not found the client will not crash --- src/components/OverviewApp/RootKeyHolder.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/OverviewApp/RootKeyHolder.tsx b/src/components/OverviewApp/RootKeyHolder.tsx index 0e3b6f75..ba313aa6 100644 --- a/src/components/OverviewApp/RootKeyHolder.tsx +++ b/src/components/OverviewApp/RootKeyHolder.tsx @@ -706,20 +706,22 @@ export default class RootKeyHolder extends Component<{}, sortable: true, grow: 1, wrap: true, + cell: (row: any) => { + return
{row?.name ? row.name : "Not Available"}
; + }, }, { name: "Address", selector: (row: DataCapRemovalRequest) => row?.address, sortable: true, - cell: (row: DataCapRemovalRequest) => ( -
{`${row?.address?.substring( - 0, - 9 - )}...${row?.address.substring( - row?.address.length - 9, - row?.address.length - )}`}
- ), + cell: (row: DataCapRemovalRequest) => { + if (row?.address) { + return ( +
{`${row.address.substring(0, 9)}...${row.address.substring(row.address.length - 9)}`}
+ ); + } + return
Not Available
; + }, }, { name: "Datacap",