Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Chirag-S-Kotian committed Nov 11, 2024
2 parents 647944c + 46401de commit 48211b6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions explorer/src/assets/watermarks/revoked-watermark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const AttestationCard: React.FC<IAttestationCardProps> = ({
portalId,
issuanceDate,
expiryDate,
revoked,
}) => {
const {
sdk,
Expand Down Expand Up @@ -102,9 +103,19 @@ export const AttestationCard: React.FC<IAttestationCardProps> = ({
return (
<div
key={`${id}`}
className="group flex flex-col justify-between gap-4 border border-border-card dark:border-border-cardDark rounded-xl p-4 md:p-6 hover:bg-surface-secondary dark:hover:bg-surface-secondaryDark transition md:min-h-[20rem]"
className={`relative group flex flex-col justify-between gap-4 border border-border-card dark:border-border-cardDark rounded-xl p-4 md:p-6 hover:bg-surface-secondary dark:hover:bg-surface-secondaryDark transition md:min-h-[20rem] ${
(isExpired || revoked) && "bg-surface-darkGrey dark:bg-surface-darkGreyDark"
}`}
>
<div>
{revoked && (
<div
className="absolute inset-0 flex items-center justify-center text-red-500 text-4xl md:text-6xl font-bold opacity-50 pointer-events-none"
style={{ transform: "rotate(-45deg)" }}
>
Revoked
</div>
)}
<div className="flex items-start gap-3 text-xl md:text-md font-semibold text-blackDefault dark:text-whiteDefault">
<div className="w-[2.5rem] h-[2.5rem] md:w-[3rem] md:h-[3rem] flex items-center mr-2 justify-center">
{displayLogo()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export interface IAttestationCardProps {
portalId: string;
issuanceDate: number;
expiryDate?: number;
revoked: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const CardView: React.FC<ICardViewProps> = ({ attestationsList }) => {
portalId={attestation.portal.id}
issuanceDate={attestation.attestedDate}
expiryDate={attestation.expirationDate}
revoked={attestation.revoked}
/>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export interface ICardViewProps {
};
attestedDate: number;
expirationDate?: number;
revoked: boolean;
}>;
}

0 comments on commit 48211b6

Please sign in to comment.