diff --git a/src/components/nostr/kinds/ZapstoreAppDetailRenderer.tsx b/src/components/nostr/kinds/ZapstoreAppDetailRenderer.tsx index 4e08dff..89d7e41 100644 --- a/src/components/nostr/kinds/ZapstoreAppDetailRenderer.tsx +++ b/src/components/nostr/kinds/ZapstoreAppDetailRenderer.tsx @@ -78,9 +78,8 @@ function PlatformItem({ platform }: { platform: Platform }) { } /** - * Detail renderer for Kind 32267 - Zapstore App Metadata - * Shows comprehensive app information including screenshots - * Note: Zapstore helpers wrap getTagValue which caches internally + * Detail renderer for Kind 32267 - App + * Shows comprehensive app information including screenshots and platforms */ export function ZapstoreAppDetailRenderer({ event, diff --git a/src/components/nostr/kinds/ZapstoreAppRenderer.tsx b/src/components/nostr/kinds/ZapstoreAppRenderer.tsx index ddb62b2..204bb7a 100644 --- a/src/components/nostr/kinds/ZapstoreAppRenderer.tsx +++ b/src/components/nostr/kinds/ZapstoreAppRenderer.tsx @@ -8,71 +8,11 @@ import { getAppSummary, detectPlatforms, } from "@/lib/zapstore-helpers"; -import { - Globe, - Smartphone, - TabletSmartphone, - Monitor, - Laptop, -} from "lucide-react"; -import type { Platform } from "@/lib/zapstore-helpers"; +import { PlatformIcon } from "./zapstore/PlatformIcon"; /** - * Platform icon component with label - */ -function PlatformIcon({ platform }: { platform: Platform }) { - const iconClass = "size-4 text-muted-foreground"; - - const getPlatformLabel = () => { - switch (platform) { - case "android": - return "Android"; - case "ios": - return "iOS"; - case "web": - return "Web"; - case "macos": - return "macOS"; - case "windows": - return "Windows"; - case "linux": - return "Linux"; - default: - return platform; - } - }; - - const getIcon = () => { - switch (platform) { - case "android": - return ; - case "ios": - return ; - case "web": - return ; - case "macos": - return ; - case "windows": - case "linux": - return ; - default: - return null; - } - }; - - return ( -
- {getIcon()} - - {getPlatformLabel()} - -
- ); -} - -/** - * Renderer for Kind 32267 - Zapstore App Metadata - * Displays app name, icon, summary, and platform icons in feed + * Renderer for Kind 32267 - App Metadata + * Clean feed view with app name, summary, and platform icons */ export function ZapstoreAppRenderer({ event }: BaseEventProps) { const appName = getAppName(event); @@ -82,7 +22,6 @@ export function ZapstoreAppRenderer({ event }: BaseEventProps) { return (
- {/* App Name */} - {/* Summary */} {summary && (

{summary}

)} - {/* Platform Icons */} {platforms.length > 0 && (
{platforms.map((platform) => ( diff --git a/src/components/nostr/kinds/ZapstoreAppSetDetailRenderer.tsx b/src/components/nostr/kinds/ZapstoreAppSetDetailRenderer.tsx index c1ec42f..7d4e6e5 100644 --- a/src/components/nostr/kinds/ZapstoreAppSetDetailRenderer.tsx +++ b/src/components/nostr/kinds/ZapstoreAppSetDetailRenderer.tsx @@ -8,78 +8,18 @@ import { detectPlatforms, getCurationSetIdentifier, } from "@/lib/zapstore-helpers"; -import type { Platform } from "@/lib/zapstore-helpers"; import { useNostrEvent } from "@/hooks/useNostrEvent"; import { useGrimoire } from "@/core/state"; import { UserName } from "../UserName"; -import { - Package, - Globe, - Smartphone, - TabletSmartphone, - Monitor, - Laptop, -} from "lucide-react"; +import { Package } from "lucide-react"; +import { PlatformIcon } from "./zapstore/PlatformIcon"; interface ZapstoreAppSetDetailRendererProps { event: NostrEvent; } /** - * Platform icon component with label - */ -function PlatformIcon({ platform }: { platform: Platform }) { - const iconClass = "size-4 text-muted-foreground"; - - const getPlatformLabel = () => { - switch (platform) { - case "android": - return "Android"; - case "ios": - return "iOS"; - case "web": - return "Web"; - case "macos": - return "macOS"; - case "windows": - return "Windows"; - case "linux": - return "Linux"; - default: - return platform; - } - }; - - const getIcon = () => { - switch (platform) { - case "android": - return ; - case "ios": - return ; - case "web": - return ; - case "macos": - return ; - case "windows": - case "linux": - return ; - default: - return null; - } - }; - - return ( -
- {getIcon()} - - {getPlatformLabel()} - -
- ); -} - -/** - * Expanded app card showing full app details + * App card showing app details with icon, summary, and platforms */ function AppCard({ address, @@ -113,7 +53,6 @@ function AppCard({ return (
- {/* App Icon */} {iconUrl ? ( )} - {/* App Info */}
- {/* App Name */}
- {/* Metadata Grid */}
- {/* Publisher */}

Publisher

- {/* Release Identifier */} {identifier && (

Release ID

@@ -113,7 +104,6 @@ export function ZapstoreReleaseDetailRenderer({ )}
- {/* File Metadata Section */} {fileEvent && (

@@ -126,7 +116,6 @@ export function ZapstoreReleaseDetailRenderer({

)} - {/* Loading/Missing States */} {fileEventId && !fileEvent && (
diff --git a/src/components/nostr/kinds/ZapstoreReleaseRenderer.tsx b/src/components/nostr/kinds/ZapstoreReleaseRenderer.tsx index dc1bfd6..e788ec7 100644 --- a/src/components/nostr/kinds/ZapstoreReleaseRenderer.tsx +++ b/src/components/nostr/kinds/ZapstoreReleaseRenderer.tsx @@ -15,8 +15,8 @@ import { Badge } from "@/components/ui/badge"; import { Package, FileDown } from "lucide-react"; /** - * Renderer for Kind 30063 - Zapstore Release - * Displays release version and links to app and file metadata + * Renderer for Kind 30063 - App Release + * Displays release version with links to app and download file */ export function ZapstoreReleaseRenderer({ event }: BaseEventProps) { const { addWindow } = useGrimoire(); @@ -24,7 +24,6 @@ export function ZapstoreReleaseRenderer({ event }: BaseEventProps) { const fileEventId = getReleaseFileEventId(event); const appPointer = getReleaseAppPointer(event); - // Fetch app metadata to show app name const appEvent = useNostrEvent(appPointer || undefined); const appName = appEvent ? getAppName(appEvent) : appPointer?.identifier; @@ -43,7 +42,6 @@ export function ZapstoreReleaseRenderer({ event }: BaseEventProps) { return (
- {/* Title */} - {/* Links */}
- {/* App Link - show app name with icon */} {appName && (