Skip to content

Commit

Permalink
fix: onclick function warnings in console
Browse files Browse the repository at this point in the history
Signed-off-by: pranalidhanavade <[email protected]>
  • Loading branch information
pranalidhanavade committed Dec 31, 2024
1 parent be5eb15 commit 81f277b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/commonComponents/SchemaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,12 @@ const handleCheckboxChange = (checked: boolean, schemaData?: ISchemaData) => {
}
};


return (
<Card onClick={() => {

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,
Expand Down

0 comments on commit 81f277b

Please sign in to comment.