From 632469794ace43e1f219e434132f6cbb3b716215 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Tue, 1 Apr 2025 19:07:36 +0200 Subject: [PATCH] refactor verification status indicators in KIND20Card and QuickViewKind20NoteCard for improved tooltip display --- components/KIND20Card.tsx | 7 +++- components/QuickViewKind20NoteCard.tsx | 54 +++++++++++--------------- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/components/KIND20Card.tsx b/components/KIND20Card.tsx index 8e77811..08cef61 100644 --- a/components/KIND20Card.tsx +++ b/components/KIND20Card.tsx @@ -138,11 +138,14 @@ const KIND20Card: React.FC = ({
- {verificationStatus ? ( + {/* {verificationStatus ? ( ) : ( - )} + )} */} + {!verificationStatus ? ( + + ) : (null)}
diff --git a/components/QuickViewKind20NoteCard.tsx b/components/QuickViewKind20NoteCard.tsx index 646ab26..23f535d 100644 --- a/components/QuickViewKind20NoteCard.tsx +++ b/components/QuickViewKind20NoteCard.tsx @@ -7,7 +7,6 @@ import { Card, SmallCardContent } from "@/components/ui/card" import Link from "next/link" import Image from "next/image" import { extractDimensions, getChecksumSha256 } from "@/utils/utils" -import { CheckCircle, XCircle } from "lucide-react" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" interface QuickViewKind20NoteCardProps { @@ -102,38 +101,28 @@ const QuickViewKind20NoteCard: React.FC = ({ onError={() => setImageError(true)} /> - {/* Verification status indicator with tooltip */} - {verificationStatus !== null && ( -
- - - -
- {verificationStatus ? ( - - ) : ( - - )} + {/* Red line under image when verification fails */} + {verificationStatus === false && ( + + + +
+
+ +
+

Image verification failed ✗

+
+

Event hash:

+

{eventImageHash}

- - -
-

- {verificationStatus ? "Image verified ✓" : "Image verification failed ✗"} -

-
-

Event hash:

-

{eventImageHash}

-
-
-

Calculated hash:

-

{calculatedHash}

-
+
+

Calculated hash:

+

{calculatedHash}

- - - -
+
+
+
+
)}
@@ -154,4 +143,5 @@ const QuickViewKind20NoteCard: React.FC = ({ ) } -export default QuickViewKind20NoteCard \ No newline at end of file +export default QuickViewKind20NoteCard +