From 08ccf3ee056161ce745e5474d489a271b794ff33 Mon Sep 17 00:00:00 2001 From: pranalidhanavade <137780597+pranalidhanavade@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:25:39 +0530 Subject: [PATCH] Fix verification dashboard changes (#735) * fix: issuance schemaName issue Signed-off-by: pranalidhanavade * fix: verification breadcrumb fixes Signed-off-by: pranalidhanavade * fix: schema card hover issue Signed-off-by: pranalidhanavade * fix: delete organization delete svg issue Signed-off-by: pranalidhanavade * fix: sonarclous issues Signed-off-by: pranalidhanavade * fix: sonarlint issues duplication error Signed-off-by: pranalidhanavade * fix: added highlight tag for fixing code logic Signed-off-by: pranalidhanavade * fix: added limited attriutes value in common constant file Signed-off-by: pranalidhanavade * fix: resolved comments on pull request Signed-off-by: pranalidhanavade * fix: type errors in schemaList Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade --- src/commonComponents/SchemaCard.tsx | 9 +-------- src/commonComponents/interface.ts | 7 +------ src/components/Resources/Schema/SchemasList.tsx | 15 +++++---------- src/components/Verification/EmailVerification.tsx | 1 + 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/commonComponents/SchemaCard.tsx b/src/commonComponents/SchemaCard.tsx index 1dc20dc7b..e00d582a2 100644 --- a/src/commonComponents/SchemaCard.tsx +++ b/src/commonComponents/SchemaCard.tsx @@ -69,14 +69,7 @@ const handleCheckboxChange = (checked: boolean, schemaData?: ISchemaData) => { { if (!props.w3cSchema) { - const schemaData = { - schemaId: props.schemaId, - attributes: props.attributes, - issuerDid: props.issuerDid, - created: props.created, - }; - - props.onClickCallback(schemaData); + props.onClickCallback(props.schemaId, props.attributes, props.issuerDid, props.created) } if (props.w3cSchema) { diff --git a/src/commonComponents/interface.ts b/src/commonComponents/interface.ts index 7e5736f00..272af59f9 100644 --- a/src/commonComponents/interface.ts +++ b/src/commonComponents/interface.ts @@ -40,12 +40,7 @@ export interface ISchemaCardProps { created: string; isClickable?: boolean; showCheckbox?: boolean; - onClickCallback: (schemaData: { - schemaId: string; - attributes: string[]; - issuerDid: string; - created: string; - }) => void; + onClickCallback: (schemaId: string, attributes: string[], issuerDid: string, created: string) => void; onClickW3CCallback: (W3CSchemaData: { schemaId: string; diff --git a/src/components/Resources/Schema/SchemasList.tsx b/src/components/Resources/Schema/SchemasList.tsx index e3b7e51c5..0c3760db6 100644 --- a/src/components/Resources/Schema/SchemasList.tsx +++ b/src/components/Resources/Schema/SchemasList.tsx @@ -140,17 +140,12 @@ const SchemaList = (props: { } }; - const schemaSelectionCallback = ({ - schemaId, - attributes, - issuerId, - created, - }: { - schemaId: string; - attributes: string[]; + const schemaSelectionCallback = ( + schemaId: string, + attributes: string[], issuerId: string, - created: string; - }) => { + created: string, + ) => { const schemaDetails = { attribute: attributes, issuerDid: issuerId, diff --git a/src/components/Verification/EmailVerification.tsx b/src/components/Verification/EmailVerification.tsx index 885ced408..ded51ba8d 100644 --- a/src/components/Verification/EmailVerification.tsx +++ b/src/components/Verification/EmailVerification.tsx @@ -12,6 +12,7 @@ import type { IEmailValues, IPredicate, IRequestedAttributes, ISelectedAttribute import { getOrganizationById } from '../../api/organization'; import { pathRoutes } from '../../config/pathRoutes'; import { AlertComponent } from '../AlertComponent'; +import React from 'react'; const EmailVerification = () => { const [loading, setLoading] = useState(false);