diff --git a/src/commonComponents/SchemaCard.tsx b/src/commonComponents/SchemaCard.tsx index 92a42002..644e6003 100644 --- a/src/commonComponents/SchemaCard.tsx +++ b/src/commonComponents/SchemaCard.tsx @@ -65,15 +65,12 @@ const handleCheckboxChange = (checked: boolean, schemaData?: ISchemaData) => { } }; - return ( { - - if (!props.w3cSchema) { - props.onClickCallback(props.schemaId, props.attributes, props.issuerDid, props.created) + if (!props.w3cSchema && props.onClickCallback) { + props.onClickCallback(props.schemaId, props.attributes, props.issuerDid, props.created); } - - if (props.w3cSchema) { + if (props.w3cSchema && props.onClickW3CCallback) { const W3CSchemaData = { schemaId: props.schemaId, schemaName: props.schemaName,