show public key and certificate correctly

This commit is contained in:
jenny-s51 2021-05-18 11:17:52 -04:00
parent e82be4ccf8
commit dd41d93f38

View file

@ -14,6 +14,7 @@ import { cellWidth } from "@patternfly/react-table";
type KeyData = KeyMetadataRepresentation & {
provider?: string;
type?: string;
};
type KeysTabInnerProps = {
@ -34,6 +35,8 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
return keys;
};
console.log("Keys", keys)
React.useEffect(() => {
refresh();
}, [keys]);
@ -62,8 +65,8 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
return <>{provider}</>;
};
const ButtonRenderer = ({ provider, publicKey, certificate }: KeyData) => {
if (provider === "ecdsa-generated") {
const ButtonRenderer = ({ type, publicKey, certificate }: KeyData) => {
if (type === "EC") {
return (
<>
<Button
@ -78,7 +81,7 @@ export const KeysTabInner = ({ keys }: KeysTabInnerProps) => {
</Button>
</>
);
} else if (provider === "rsa-generated" || provider === "fallback-RS256") {
} else if (type === "RSA") {
return (
<>
<div>