Skip to content

Commit 873f73b

Browse files
fix as per review comments
1 parent 3f27988 commit 873f73b

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

client/src/app/pages/TrustRoots/components/DrawerContents/TrustRootMetadataTab.tsx

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface TrustRootMetadataTabProps {
1111
}
1212

1313
const TrustRootMetadataTab: React.FC<TrustRootMetadataTabProps> = ({ trustRoot }) => {
14-
if (!trustRoot) {
14+
if (!trustRoot?.tufMetadata || !Array.isArray(trustRoot.tufMetadata) || trustRoot.tufMetadata.length === 0) {
1515
return <TrustRootNotFound />;
1616
}
1717
const latestTUF = trustRoot?.tufMetadata[0];
@@ -93,43 +93,3 @@ const TrustRootMetadataTab: React.FC<TrustRootMetadataTabProps> = ({ trustRoot }
9393
};
9494

9595
export default TrustRootMetadataTab;
96-
97-
// const table = <>
98-
// <Pagination itemCount={trustRoot.tufMetadata.length} perPage={10} page={1} variant="top" />
99-
// <Table variant="compact">
100-
// <Thead>
101-
// <Tr>
102-
// <Th>Version</Th>
103-
// <Th>Expires</Th>
104-
// <Th>Role</Th>
105-
// <Th>Status</Th>
106-
// </Tr>
107-
// </Thead>
108-
// <Tbody>
109-
// {trustRoot.tufMetadata.map((metadata, idx) => (
110-
// <Tr key={idx}>
111-
// <Td>{metadata.version}</Td>
112-
// <Td>{formatDate(metadata.expires)}</Td>
113-
// <Td>{metadata.role}</Td>
114-
// <Td>
115-
// <Flex spaceItems={{ default: 'spaceItemsSm' }}>
116-
// <FlexItem>
117-
// {metadata.status === 'valid' ? (
118-
// <Icon status="success">
119-
// <CheckCircleIcon />
120-
// </Icon>
121-
// ) : (
122-
// <Icon status="warning">
123-
// <ExclamationTriangleIcon />
124-
// </Icon>
125-
// )}{' '}
126-
// {capitalizeFirstLetter(metadata.status)}
127-
// </FlexItem>
128-
// </Flex>
129-
// </Td>
130-
// </Tr>
131-
// ))}
132-
// </Tbody>
133-
// </Table>
134-
// <Pagination itemCount={trustRoot.tufMetadata.length} perPage={10} page={1} variant="bottom" />
135-
// </>

0 commit comments

Comments
 (0)