diff --git a/src/components/EventDetailViewer.tsx b/src/components/EventDetailViewer.tsx index fa12b63..0e99771 100644 --- a/src/components/EventDetailViewer.tsx +++ b/src/components/EventDetailViewer.tsx @@ -263,46 +263,45 @@ export function EventDetailViewer({ pointer }: EventDetailViewerProps) { - {/* Rendered Content with Tabs */} -
- - - - Detail - - {eventSpells.map((spell) => ( - - {spell.name || spell.alias || "Untitled Spell"} - - ))} - - - {/* Detail Tab Content */} - - - - - - - {/* Spell Tab Contents */} - {eventSpells.map((spell) => ( - - ))} - + {/* Rendered Content */} +
+ + +
+ {/* Spell Tabs */} + {eventSpells.length > 0 && ( +
+ + + {eventSpells.map((spell) => ( + + {spell.name || spell.alias || "Untitled Spell"} + + ))} + + + {/* Spell Tab Contents */} + {eventSpells.map((spell) => ( + + ))} + +
+ )} + {/* JSON Viewer Dialog */}
- {/* Profile Content with Tabs */} -
- - - - Profile - - {pubkeySpells.map((spell) => ( - - {spell.name || spell.alias || "Untitled Spell"} - - ))} - + {/* Profile Content */} +
+ {!profile && !profileEvent && } - {/* Profile Tab Content */} - - {!profile && !profileEvent && ( - - )} + {!profile && profileEvent && ( +
+ No profile metadata found +
+ )} - {!profile && profileEvent && ( -
- No profile metadata found -
- )} - - {profile && ( -
-
- {/* Display Name */} - - {/* NIP-05 */} - {profile.nip05 && ( -
- -
- )} + {profile && ( +
+
+ {/* Display Name */} + + {/* NIP-05 */} + {profile.nip05 && ( +
+
+ )} +
- {/* About/Bio */} - {profile.about && ( -
-
- About -
- -
- )} - - {/* Website */} - {profile.website && ( -
-
- Website -
- - {profile.website} - -
- )} - - {/* Lightning Address */} - {profile.lud16 && ( -
-
- Lightning Address -
- -
- )} - - {/* LUD06 (LNURL) */} - {profile.lud06 && ( -
-
- LNURL -
- - {profile.lud06} - -
- )} + {/* About/Bio */} + {profile.about && ( +
+
+ About +
+
)} - - {/* Spell Tab Contents */} - {pubkeySpells.map((spell) => ( - - ))} - + {/* Website */} + {profile.website && ( +
+
+ Website +
+ + {profile.website} + +
+ )} + + {/* Lightning Address */} + {profile.lud16 && ( +
+
+ Lightning Address +
+ +
+ )} + + {/* LUD06 (LNURL) */} + {profile.lud06 && ( +
+
+ LNURL +
+ + {profile.lud06} + +
+ )} +
+ )}
+ + {/* Spell Tabs */} + {pubkeySpells.length > 0 && ( +
+ + + {pubkeySpells.map((spell) => ( + + {spell.name || spell.alias || "Untitled Spell"} + + ))} + + + {/* Spell Tab Contents */} + {pubkeySpells.map((spell) => ( + + ))} + +
+ )}
); } diff --git a/src/components/RelayViewer.tsx b/src/components/RelayViewer.tsx index 222f75a..64e5a9c 100644 --- a/src/components/RelayViewer.tsx +++ b/src/components/RelayViewer.tsx @@ -147,109 +147,108 @@ export function RelayViewer({ url }: RelayViewerProps) { return (
- - - - Info - - {relaySpells.map((spell) => ( - - {spell.name || spell.alias || "Untitled Spell"} - - ))} - + {/* Relay Info Content */} +
+ {/* Header */} +
+
+

+ {info?.name || "Unknown Relay"} +

+
+ {url} + +
+ {info?.description && ( +

{info.description}

+ )} +
+
- {/* Info Tab Content */} - - {/* Header */} -
-
-

- {info?.name || "Unknown Relay"} -

-
- {url} - -
- {info?.description && ( -

{info.description}

+ {/* Operator */} + {(info?.contact || info?.pubkey) && ( +
+

Operator

+
+ {info.contact && info.contact.length == 64 && ( + + )} + {info.pubkey && info.pubkey.length === 64 && ( + )}
+ )} - {/* Operator */} - {(info?.contact || info?.pubkey) && ( -
-

Operator

-
- {info.contact && info.contact.length == 64 && ( - - )} - {info.pubkey && info.pubkey.length === 64 && ( - - )} -
+ {/* Software */} + {(info?.software || info?.version) && ( +
+

Software

+ + {info.software || info.version} + +
+ )} + + {/* Supported NIPs */} + {info?.supported_nips && info.supported_nips.length > 0 && ( +
+

Supported NIPs

+
+ {info.supported_nips.map((num: number) => ( + + ))}
- )} +
+ )} +
- {/* Software */} - {(info?.software || info?.version) && ( -
-

Software

- - {info.software || info.version} - -
- )} + {/* Spell Tabs */} + {relaySpells.length > 0 && ( +
+ + + {relaySpells.map((spell) => ( + + {spell.name || spell.alias || "Untitled Spell"} + + ))} + - {/* Supported NIPs */} - {info?.supported_nips && info.supported_nips.length > 0 && ( -
-

Supported NIPs

-
- {info.supported_nips.map((num: number) => ( - - ))} -
-
- )} - - - {/* Spell Tab Contents */} - {relaySpells.map((spell) => ( - - ))} -
+ {/* Spell Tab Contents */} + {relaySpells.map((spell) => ( + + ))} + +
+ )}
); }