From 6108968434968198ee5e78103f430a2f5554d79b Mon Sep 17 00:00:00 2001 From: Satyajeet Kolhapure <77279246+satyajeetkolhapure@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:10:36 +0000 Subject: [PATCH] feat(explorer): As a user, I want to see Expired and Revoked Attestations with a watermark on the Subject page (#794) Co-authored-by: Alain Nicolas --- .../src/assets/watermarks/revoked-watermark.svg | 7 +++++++ .../components/AttestationCard/index.tsx | 13 ++++++++++++- .../components/AttestationCard/interface.ts | 1 + .../Attestations/components/CardView/index.tsx | 1 + .../Attestations/components/CardView/interface.ts | 1 + 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 explorer/src/assets/watermarks/revoked-watermark.svg diff --git a/explorer/src/assets/watermarks/revoked-watermark.svg b/explorer/src/assets/watermarks/revoked-watermark.svg new file mode 100644 index 00000000..7caa1907 --- /dev/null +++ b/explorer/src/assets/watermarks/revoked-watermark.svg @@ -0,0 +1,7 @@ + + + + + Revoked + + diff --git a/explorer/src/pages/Attestation/components/AttestationCard/index.tsx b/explorer/src/pages/Attestation/components/AttestationCard/index.tsx index cbcbe001..56b0519c 100644 --- a/explorer/src/pages/Attestation/components/AttestationCard/index.tsx +++ b/explorer/src/pages/Attestation/components/AttestationCard/index.tsx @@ -23,6 +23,7 @@ export const AttestationCard: React.FC = ({ portalId, issuanceDate, expiryDate, + revoked, }) => { const { sdk, @@ -102,9 +103,19 @@ export const AttestationCard: React.FC = ({ return (
+ {revoked && ( +
+ Revoked +
+ )}
{displayLogo()} diff --git a/explorer/src/pages/Attestation/components/AttestationCard/interface.ts b/explorer/src/pages/Attestation/components/AttestationCard/interface.ts index bbdf149c..e0b03a76 100644 --- a/explorer/src/pages/Attestation/components/AttestationCard/interface.ts +++ b/explorer/src/pages/Attestation/components/AttestationCard/interface.ts @@ -4,4 +4,5 @@ export interface IAttestationCardProps { portalId: string; issuanceDate: number; expiryDate?: number; + revoked: boolean; } diff --git a/explorer/src/pages/Attestations/components/CardView/index.tsx b/explorer/src/pages/Attestations/components/CardView/index.tsx index 8a3267fd..a8e97393 100644 --- a/explorer/src/pages/Attestations/components/CardView/index.tsx +++ b/explorer/src/pages/Attestations/components/CardView/index.tsx @@ -15,6 +15,7 @@ export const CardView: React.FC = ({ attestationsList }) => { portalId={attestation.portal.id} issuanceDate={attestation.attestedDate} expiryDate={attestation.expirationDate} + revoked={attestation.revoked} /> ); })} diff --git a/explorer/src/pages/Attestations/components/CardView/interface.ts b/explorer/src/pages/Attestations/components/CardView/interface.ts index 6c63b2bf..2b3695d4 100644 --- a/explorer/src/pages/Attestations/components/CardView/interface.ts +++ b/explorer/src/pages/Attestations/components/CardView/interface.ts @@ -9,5 +9,6 @@ export interface ICardViewProps { }; attestedDate: number; expirationDate?: number; + revoked: boolean; }>; }