diff --git a/src/components/createIdentifierCard.tsx b/src/components/createIdentifierCard.tsx index b273d721..4baf0f91 100644 --- a/src/components/createIdentifierCard.tsx +++ b/src/components/createIdentifierCard.tsx @@ -22,19 +22,13 @@ export function CreateIdentifierCard( useEffect(() => { setNameError(props.error); }, [props.error]); - const onBlurName = () => { - if (!name) { - setNameError(emptyNameError); - } else { - setNameError(""); - } - }; const handleRemoveWhiteSpace = () => { setName(removeWhiteSpace(name)); setNameError(""); }; - const onCreateIdentifier = async () => { + const onCreateIdentifier = async (e?: React.SyntheticEvent) => { + e?.preventDefault(); let hasError = false; if (!name) { setNameError(emptyNameError); @@ -45,6 +39,7 @@ export function CreateIdentifierCard( {formatMessage({ id: "identifier.error.noWhiteSpace" })}{" "} - + ); } diff --git a/src/components/identifierCard.tsx b/src/components/identifierCard.tsx index 1c9ec2f7..af042964 100644 --- a/src/components/identifierCard.tsx +++ b/src/components/identifierCard.tsx @@ -51,7 +51,7 @@ export function IdentifierCard({ aid }: IIdentifierCard): JSX.Element { - +

{aid.prefix}

-
- ) : ( - <> - )}

{formatMessage({ id: "config.vendorUrl.label" })} @@ -170,6 +158,20 @@ export function Config(props: any): JSX.Element { onSelect={(option) => changeLocale(option.value)} />

+ {hasOnboarded ? ( +
+ +
+ ) : ( + <> + )} ); }