From 13a197e80dc3da1d5e035e580a864233c43190ef Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Sun, 12 Oct 2025 18:45:59 -0500 Subject: [PATCH 1/5] Implement app showcase on New Project view - Add useAppSubmissions hook to query Nostr events (kind 31733) - Create AppShowcaseCard component for displaying individual apps - Add AppShowcase component with search, filtering, and categorization - Include featured apps, Halloween hackathon apps, templates, and approved apps sections - Add shuffleArray utility function for randomizing app display order - Integrate showcase into Index page underneath the prompt text box - Support moderation controls for authorized users - Add responsive design with mobile-friendly tag filtering - Include empty states with relay selector for no results --- src/components/AppShowcase.tsx | 447 ++++++++++++++++++++ src/components/AppShowcaseCard.tsx | 657 +++++++++++++++++++++++++++++ src/hooks/useAppSubmissions.ts | 265 ++++++++++++ src/lib/utils.ts | 12 + src/pages/Index.tsx | 4 + 5 files changed, 1385 insertions(+) create mode 100644 src/components/AppShowcase.tsx create mode 100644 src/components/AppShowcaseCard.tsx create mode 100644 src/hooks/useAppSubmissions.ts diff --git a/src/components/AppShowcase.tsx b/src/components/AppShowcase.tsx new file mode 100644 index 00000000..a3eb858c --- /dev/null +++ b/src/components/AppShowcase.tsx @@ -0,0 +1,447 @@ +import React, { useState, useMemo, useEffect } from "react"; +import { Plus, Search, Filter, Eye, EyeOff } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge"; +import { Input } from "@/components/ui/input"; +import { useCurrentUser } from "@/hooks/useCurrentUser"; +import { useAppSubmissions } from "@/hooks/useAppSubmissions"; +import { AppShowcaseCard } from "@/components/AppShowcaseCard"; +import { useIsMobile } from "@/hooks/useIsMobile"; +import { + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "@/components/ui/collapsible"; +import { nip19 } from 'nostr-tools'; +import { shuffleArray } from "@/lib/utils"; +import type { AppSubmission } from "@/hooks/useAppSubmissions"; +import { Skeleton } from "@/components/ui/skeleton"; +import { Card, CardContent } from "@/components/ui/card"; +import { RelaySelector } from "@/components/RelaySelector"; + +export function AppShowcase() { + const { user } = useCurrentUser(); + const { data: submissions = [], isLoading } = useAppSubmissions(); + const isMobile = useIsMobile(); + const [searchTerm, setSearchTerm] = useState(""); + const [selectedTag, setSelectedTag] = useState(null); + const [showAllApps, setShowAllApps] = useState(false); + const [showAllTags, setShowAllTags] = useState(false); + + const MODERATOR_NPUB = 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc'; + const MODERATOR_HEX = (() => { + try { + const decoded = nip19.decode(MODERATOR_NPUB); + return decoded.type === 'npub' ? decoded.data : ''; + } catch { + return ''; + } + })(); + const isModerator = user?.pubkey === MODERATOR_HEX; + + // Filter submissions + const visibleSubmissions = submissions.filter(app => !app.isHidden); + + // Separate template apps from other apps + const templateApps = useMemo(() => + shuffleArray(visibleSubmissions.filter(app => app.appTags.includes('Template'))), + [visibleSubmissions] + ); + const nonTemplateSubmissions = visibleSubmissions.filter(app => !app.appTags.includes('Template')); + + // Get Halloween Hackathon 2025 apps that are featured (for main showcase) + const halloweenApps = useMemo(() => + shuffleArray(nonTemplateSubmissions.filter(app => + app.appTags.includes('Halloween Hackathon 2025') && app.isFeatured + )), + [nonTemplateSubmissions] + ); + + // Filter out Halloween Hackathon 2025 apps from other sections (unless featured, they go in Halloween section) + const nonHalloweenSubmissions = nonTemplateSubmissions.filter(app => + !app.appTags.includes('Halloween Hackathon 2025') + ); + + // Shuffle featured and approved apps on each component mount/render for random display order + const featuredApps = useMemo(() => + shuffleArray(nonHalloweenSubmissions.filter(app => app.isFeatured)), + [nonHalloweenSubmissions] + ); + const approvedApps = useMemo(() => + shuffleArray(nonHalloweenSubmissions.filter(app => app.isApproved && !app.isFeatured)), + [nonHalloweenSubmissions] + ); + + // Apply search and tag filters + const filterApps = (apps: AppSubmission[]) => { + return apps.filter(app => { + const matchesSearch = !searchTerm || + app.appName.toLowerCase().includes(searchTerm.toLowerCase()) || + app.description.toLowerCase().includes(searchTerm.toLowerCase()) || + app.appTags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); + + const matchesTag = !selectedTag || app.appTags.includes(selectedTag); + + return matchesSearch && matchesTag; + }); + }; + + const filteredFeaturedApps = filterApps(featuredApps); + const filteredHalloweenApps = filterApps(halloweenApps); + const filteredApprovedApps = filterApps(approvedApps); + const filteredTemplateApps = filterApps(templateApps); + + // Get all unique tags from approved and featured apps only (exclude pending, hidden, and template apps) + const allTags = Array.from(new Set([...featuredApps, ...approvedApps].flatMap(app => app.appTags))).sort(); + + // Get the most popular tags based on frequency (excluding Halloween Hackathon 2025 tag) + const tagCounts = new Map(); + [...featuredApps, ...approvedApps, ...templateApps].forEach(app => { + app.appTags.forEach(tag => { + // Don't include Halloween Hackathon 2025 in the tag filters + if (tag !== 'Halloween Hackathon 2025') { + tagCounts.set(tag, (tagCounts.get(tag) || 0) + 1); + } + }); + }); + + const sortedTags = Array.from(tagCounts.entries()) + .sort((a, b) => b[1] - a[1]) // Sort by count descending + .map(([tag]) => tag); // Extract just the tag names + + // Always show Template as the first tag if templates exist + const topTags: string[] = []; + if (templateApps.length > 0) { + topTags.push('Template'); + // Remove Template from sortedTags to avoid duplication + const templateIndex = sortedTags.indexOf('Template'); + if (templateIndex > -1) { + sortedTags.splice(templateIndex, 1); + } + } + + // Show fewer tags on mobile, more on desktop + const maxTagsToShow = isMobile ? 3 : 5; + const availableSlots = maxTagsToShow - topTags.length; + const popularTags = [...topTags, ...sortedTags.slice(0, availableSlots)]; + const remainingTags = sortedTags.slice(availableSlots); + + const handleTagSelect = (tag: string | null) => { + setSelectedTag(tag); + }; + + // Don't show showcase if no apps exist + if (isLoading) { + return ( +
+
+

Community Showcase

+

+ Discover amazing applications built by our community +

+
+
+ {Array.from({ length: 6 }).map((_, i) => ( + + + +
+ +
+ + +
+
+
+ + +
+
+ + +
+
+ + + +
+
+
+ ))} +
+
+ ); + } + + if (!submissions.length) { + return ( +
+
+

Community Showcase

+

+ Discover amazing applications built by our community +

+
+ + +
+

+ No apps found. Try another relay? +

+ +
+
+
+
+ ); + } + + return ( +
+ {/* Header */} +
+

Community Showcase

+

+ Discover amazing applications built by our community +

+ + {/* Search and Filter */} +
+
+ + setSearchTerm(e.target.value)} + className="pl-10" + /> +
+ + {/* Tag Filters */} +
+
+ + {popularTags.map((tag) => ( + + ))} + + {/* Show More Tags Button */} + {remainingTags.length > 0 && ( + + )} +
+ + {/* Additional Tags (Collapsible) */} + {showAllTags && remainingTags.length > 0 && ( +
+ {remainingTags.map((tag) => ( + + ))} +
+ )} +
+
+
+ + {/* Apps Grid */} +
+ {/* When Template tag is selected, show only Templates */} + {selectedTag === 'Template' ? ( + <> + {/* Templates Section */} + {filteredTemplateApps.length > 0 && ( +
+
+
+ 📋 +
+
+

Templates

+

Ready-to-use templates to kickstart your project

+
+
+
+ {filteredTemplateApps.slice(0, 6).map((app) => ( + + ))} +
+
+ )} + + ) : ( + <> + {/* Featured Apps */} + {filteredFeaturedApps.length > 0 && ( +
+
+
+ ⭐ +
+
+

Featured Apps

+

Handpicked applications showcasing the best of our community

+
+
+
+ {filteredFeaturedApps.slice(0, 6).map((app) => ( + + ))} +
+
+ )} + + {/* Halloween Hackathon 2025 Apps */} + {filteredHalloweenApps.length > 0 && ( +
+
+
+ 🎃 +
+
+

Halloween Hackathon 2025

+

Featured spooky creations from our Halloween hackathon

+
+
+
+ {filteredHalloweenApps.slice(0, 6).map((app) => ( + + ))} +
+
+ )} + + {/* All Apps (Approved) - Collapsible */} + {filteredApprovedApps.length > 0 && ( +
+ + + + + +
+ {filteredApprovedApps.map((app) => ( + + ))} +
+
+
+
+ )} + + {/* Templates Section */} + {filteredTemplateApps.length > 0 && ( +
+
+
+ 📋 +
+
+

Templates

+

Ready-to-use templates to kickstart your project

+
+
+
+ {filteredTemplateApps.slice(0, 6).map((app) => ( + + ))} +
+
+ )} + + )} + + {/* Empty State */} + {(() => { + if (selectedTag === 'Template') { + return filteredTemplateApps.length === 0; + } + return filteredFeaturedApps.length === 0 && filteredHalloweenApps.length === 0 && filteredApprovedApps.length === 0 && filteredTemplateApps.length === 0; + })() && ( +
+
+ +
+

+ {selectedTag === 'Template' ? 'No templates found' : 'No apps found'} +

+

+ {searchTerm || selectedTag + ? "Try adjusting your search or filters" + : "Be the first to submit an app to the showcase!" + } +

+
+ )} +
+
+ ); +} \ No newline at end of file diff --git a/src/components/AppShowcaseCard.tsx b/src/components/AppShowcaseCard.tsx new file mode 100644 index 00000000..90fb33e4 --- /dev/null +++ b/src/components/AppShowcaseCard.tsx @@ -0,0 +1,657 @@ +import React, { useState } from 'react'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Card, CardContent } from '@/components/ui/card'; +import { + ExternalLink, + GitBranch, + Edit, + Star, + StarOff, + Eye, + EyeOff, + MoreVertical, + CheckCircle, + XCircle, + User, + Home, + Contact, + Copy +} from 'lucide-react'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import type { AppSubmission } from '@/hooks/useAppSubmissions'; +import { useCurrentUser } from '@/hooks/useCurrentUser'; +import { useNostrPublish } from '@/hooks/useNostrPublish'; +import { useNostr } from '@nostrify/react'; +import { useAuthor } from '@/hooks/useAuthor'; +import { nip19 } from 'nostr-tools'; +import { useToast } from '@/hooks/useToast'; +import { useQueryClient } from '@tanstack/react-query'; + +interface AppShowcaseCardProps { + app: AppSubmission; + onEdit?: (app: AppSubmission) => void; + showModerationControls?: boolean; + hideApprovalStatus?: boolean; // Hide pending/approval badges +} + +export function AppShowcaseCard({ app, onEdit, showModerationControls, hideApprovalStatus }: AppShowcaseCardProps) { + const { user } = useCurrentUser(); + const { nostr } = useNostr(); + const { mutate: publishEvent, isPending } = useNostrPublish(); + const queryClient = useQueryClient(); + const [imageError, setImageError] = useState(false); + const { toast } = useToast(); + + // Get author pubkey from authorNpub field + const authorPubkey = React.useMemo(() => { + if (!app.authorNpub) return app.pubkey; // Fallback to event pubkey + + try { + // If it's already a hex key, use it directly + if (app.authorNpub.length === 64 && /^[0-9a-f]+$/i.test(app.authorNpub)) { + return app.authorNpub; + } + + // Otherwise try to decode as npub + const decoded = nip19.decode(app.authorNpub); + return decoded.type === 'npub' ? decoded.data : app.pubkey; + } catch { + return app.pubkey; // Fallback to event pubkey if decode fails + } + }, [app.authorNpub, app.pubkey]); + + const { data: authorData } = useAuthor(authorPubkey); + const isOwner = user?.pubkey === app.pubkey; + const MODERATOR_NPUB = 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc'; + const MODERATOR_HEX = (() => { + try { + const decoded = nip19.decode(MODERATOR_NPUB); + return decoded.type === 'npub' ? decoded.data : ''; + } catch { + return ''; + } + })(); + const isModerator = user?.pubkey === MODERATOR_HEX; + + // Check if this is a Halloween submission by looking for Halloween tags + const isHalloweenSubmission = app.appTags.includes('Halloween Hackathon 2025'); + + // Get contact info from Halloween submissions (these have lightning/email tags) + const getContactInfo = () => { + if (!isHalloweenSubmission) return null; + + // Look for lightning and email tags in the event tags + const lightningTag = app.tags?.find((tag: string[]) => tag[0] === 'lightning')?.[1]; + const emailTag = app.tags?.find((tag: string[]) => tag[0] === 'email')?.[1]; + + return { lightning: lightningTag, email: emailTag }; + }; + + const handleCopyContactInfo = () => { + const contactInfo = getContactInfo(); + if (!contactInfo) return; + + const info: string[] = []; + if (contactInfo.lightning) info.push(`Lightning: ${contactInfo.lightning}`); + if (contactInfo.email) info.push(`Email: ${contactInfo.email}`); + + const textToCopy = info.join('\n'); + navigator.clipboard.writeText(textToCopy); + + toast({ + title: 'Contact Info Copied!', + description: `Copied ${info.length} contact method(s) to clipboard` + }); + }; + + const handleModerationAction = async (action: 'feature' | 'unfeature' | 'approve' | 'unapprove' | 'hide' | 'unhide' | 'homepage' | 'unhomepage') => { + if (!isModerator || !user) return; + + const dTag = app.tags.find(tag => tag[0] === 'd')?.[1]; + if (!dTag) { + toast({ + title: 'Error', + description: 'Cannot perform moderation action: missing app identifier', + variant: 'destructive' + }); + return; + } + + const appCoordinate = `${app.kind}:${app.pubkey}:${dTag}`; + + try { + if (action === 'homepage' || action === 'unhomepage') { + // Get current homepage apps list + const currentHomepageLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-homepage-apps'], + limit: 1 + }]); + + const currentHomepageList = currentHomepageLists.reduce((latest: any, current: any) => + !latest || current.created_at > latest.created_at ? current : latest, + null + ); + + // Get current homepage app coordinates + const currentHomepageApps = new Set(); + if (currentHomepageList) { + currentHomepageList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => currentHomepageApps.add(tag[1])); + } + + // Update the homepage set + if (action === 'homepage') { + currentHomepageApps.add(appCoordinate); + } else { + currentHomepageApps.delete(appCoordinate); + } + + // Publish updated homepage apps list + publishEvent({ + kind: 30267, + content: 'Soapbox homepage apps curated by moderators', + tags: [ + ['d', 'soapbox-homepage-apps'], + ['title', 'Soapbox Homepage Apps'], + ['description', 'Apps displayed on the Soapbox homepage'], + ...Array.from(currentHomepageApps).map(coord => ['a', coord]) + ], + created_at: Math.floor(Date.now() / 1000) + }); + + // If adding to homepage, also ensure it's approved + if (action === 'homepage') { + // Get current approved apps list + const currentApprovedLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-approved-apps'], + limit: 1 + }]); + + const currentApprovedList = currentApprovedLists.reduce((latest: any, current: any) => + !latest || current.created_at > latest.created_at ? current : latest, + null + ); + + // Get current approved app coordinates + const currentApprovedApps = new Set(); + if (currentApprovedList) { + currentApprovedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => currentApprovedApps.add(tag[1])); + } + + // Add to approved list if not already there + currentApprovedApps.add(appCoordinate); + + // Publish updated approved apps list + publishEvent({ + kind: 30267, + content: 'Soapbox approved apps curated by moderators', + tags: [ + ['d', 'soapbox-approved-apps'], + ['title', 'Soapbox Approved Apps'], + ['description', 'Apps approved for the Soapbox showcase'], + ...Array.from(currentApprovedApps).map(coord => ['a', coord]) + ], + created_at: Math.floor(Date.now() / 1000) + }); + } + + } else if (action === 'feature' || action === 'unfeature') { + // Get current featured apps list + const currentFeaturedLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-featured-apps'], + limit: 1 + }]); + + const currentFeaturedList = currentFeaturedLists.reduce((latest: any, current: any) => + !latest || current.created_at > latest.created_at ? current : latest, + null + ); + + // Get current featured app coordinates + const currentFeaturedApps = new Set(); + if (currentFeaturedList) { + currentFeaturedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => currentFeaturedApps.add(tag[1])); + } + + // Update the featured set + if (action === 'feature') { + currentFeaturedApps.add(appCoordinate); + } else { + currentFeaturedApps.delete(appCoordinate); + } + + // Publish updated featured apps list + publishEvent({ + kind: 30267, + content: 'Soapbox featured apps curated by moderators', + tags: [ + ['d', 'soapbox-featured-apps'], + ['title', 'Soapbox Featured Apps'], + ['description', 'Apps featured in the Soapbox showcase'], + ...Array.from(currentFeaturedApps).map(coord => ['a', coord]) + ], + created_at: Math.floor(Date.now() / 1000) + }); + + // If featuring an app, also ensure it's approved + if (action === 'feature') { + // Get current approved apps list + const currentApprovedLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-approved-apps'], + limit: 1 + }]); + + const currentApprovedList = currentApprovedLists.reduce((latest: any, current: any) => + !latest || current.created_at > latest.created_at ? current : latest, + null + ); + + // Get current approved app coordinates + const currentApprovedApps = new Set(); + if (currentApprovedList) { + currentApprovedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => currentApprovedApps.add(tag[1])); + } + + // Add to approved list if not already there + currentApprovedApps.add(appCoordinate); + + // Publish updated approved apps list + publishEvent({ + kind: 30267, + content: 'Soapbox approved apps curated by moderators', + tags: [ + ['d', 'soapbox-approved-apps'], + ['title', 'Soapbox Approved Apps'], + ['description', 'Apps approved for the Soapbox showcase'], + ...Array.from(currentApprovedApps).map(coord => ['a', coord]) + ], + created_at: Math.floor(Date.now() / 1000) + }); + } + + } else if (action === 'approve' || action === 'unapprove') { + // Get current approved apps list + const currentApprovedLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-approved-apps'], + limit: 1 + }]); + + const currentApprovedList = currentApprovedLists.reduce((latest: any, current: any) => + !latest || current.created_at > latest.created_at ? current : latest, + null + ); + + // Get current approved app coordinates + const currentApprovedApps = new Set(); + if (currentApprovedList) { + currentApprovedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => currentApprovedApps.add(tag[1])); + } + + // Update the approved set + if (action === 'approve') { + currentApprovedApps.add(appCoordinate); + } else { + currentApprovedApps.delete(appCoordinate); + } + + // Publish updated approved apps list + publishEvent({ + kind: 30267, + content: 'Soapbox approved apps curated by moderators', + tags: [ + ['d', 'soapbox-approved-apps'], + ['title', 'Soapbox Approved Apps'], + ['description', 'Apps approved for the Soapbox showcase'], + ...Array.from(currentApprovedApps).map(coord => ['a', coord]) + ], + created_at: Math.floor(Date.now() / 1000) + }); + + } else if (action === 'hide' || action === 'unhide') { + // Create NIP-56 report event + publishEvent({ + kind: 1984, + content: `App ${action}den by moderator: "${app.appName}"`, + tags: [ + ['a', appCoordinate, action === 'hide' ? 'spam' : 'other'], + ['p', app.pubkey], + ['L', 'soapbox.moderation'], + ['l', action === 'hide' ? 'hidden' : 'unhidden', 'soapbox.moderation'] + ], + created_at: Math.floor(Date.now() / 1000) + }); + } + + // Invalidate queries to refresh the data + queryClient.invalidateQueries({ queryKey: ['app-submissions'] }); + + // If this is a Halloween app, also invalidate Halloween queries + if (isHalloweenSubmission) { + queryClient.invalidateQueries({ queryKey: ['halloween-submissions'] }); + queryClient.invalidateQueries({ queryKey: ['halloween-submissions-with-contacts'] }); + } + + toast({ + title: 'Success!', + description: `App "${app.appName}" ${action}d successfully` + }); + + } catch (error) { + console.error('Moderation action failed:', error); + toast({ + title: 'Error', + description: `Failed to ${action} app "${app.appName}"`, + variant: 'destructive' + }); + } + }; + + return ( + +
+ {/* App Screenshot */} + + {!imageError ? ( + {`${app.appName} setImageError(true)} + /> + ) : ( +
+
+
+ +
+

Screenshot unavailable

+
+
+ )} +
+ + {/* Status Badges */} +
+ {app.isFeatured && ( + + + Featured + + )} + {app.isHomepage && isModerator && ( + + + Homepage + + )} + {!app.isApproved && !hideApprovalStatus && ( + + + Pending + + )} +
+ + {/* Actions Menu */} + {(isOwner || showModerationControls) && ( +
+ + + + + + {isOwner && ( + onEdit?.(app)}> + + Edit App + + )} + {showModerationControls && isModerator && ( + <> + {isHalloweenSubmission && getContactInfo() && (getContactInfo()?.lightning || getContactInfo()?.email) && ( + + + View Contact Info + + )} + {!app.isApproved && ( + handleModerationAction('approve')} + disabled={isPending} + > + + Approve + + )} + {app.isApproved && !app.isFeatured && ( + handleModerationAction('unapprove')} + disabled={isPending} + > + + Unapprove + + )} + handleModerationAction(app.isFeatured ? 'unfeature' : 'feature')} + disabled={isPending} + > + {app.isFeatured ? ( + <> + + Un-feature + + ) : ( + <> + + Feature + + )} + + handleModerationAction(app.isHomepage ? 'unhomepage' : 'homepage')} + disabled={isPending} + > + {app.isHomepage ? ( + <> + + Remove from Homepage + + ) : ( + <> + + Add to Homepage + + )} + + handleModerationAction(app.isHidden ? 'unhide' : 'hide')} + disabled={isPending} + > + {app.isHidden ? ( + <> + + Unhide + + ) : ( + <> + + Hide + + )} + + + )} + + +
+ )} +
+ + +
+
+ {/* App Icon */} +
+ {`${app.appName} { + const target = e.target as HTMLImageElement; + target.style.display = 'none'; + }} + /> +
+
+

+ {app.appName.length > 50 ? `${app.appName.slice(0, 50)}...` : app.appName} +

+
+
+
+ +

{app.description}

+ + {/* Author Information */} +
+
+ {authorData?.metadata?.picture ? ( + {`${authorData.metadata.name { + const target = e.target as HTMLImageElement; + target.style.display = 'none'; + target.parentElement!.innerHTML = '
'; + }} + /> + ) : ( +
+ +
+ )} +
+ + by{' '} + + {authorData?.metadata?.name || authorData?.metadata?.display_name || 'Anonymous'} + + +
+ + {/* Tags */} + {app.appTags.length > 0 && ( +
+ {app.appTags.slice(0, 3).map((tag) => ( + + {tag} + + ))} + {app.appTags.length > 3 && ( + + +{app.appTags.length - 3} more + + )} +
+ )} + + {/* Spacer to push action links to bottom */} +
+ + {/* Action Links */} +
+ + Edit with Shakespeare + + + {app.repositoryUrl.startsWith('nostr://') ? ( + + ) : ( + + )} +
+
+
+ ); +} \ No newline at end of file diff --git a/src/hooks/useAppSubmissions.ts b/src/hooks/useAppSubmissions.ts new file mode 100644 index 00000000..4bd22406 --- /dev/null +++ b/src/hooks/useAppSubmissions.ts @@ -0,0 +1,265 @@ +import { useNostr } from '@nostrify/react'; +import { useQuery } from '@tanstack/react-query'; +import { nip19 } from 'nostr-tools'; +import type { NostrEvent } from '@nostrify/nostrify'; + +// Kind 31733 for app submissions (addressable events) +const APP_SUBMISSION_KIND = 31733; + +// The moderator npub and hex +const MODERATOR_NPUB = 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc'; +const MODERATOR_HEX = (() => { + try { + const decoded = nip19.decode(MODERATOR_NPUB); + return decoded.type === 'npub' ? decoded.data : ''; + } catch { + return ''; + } +})(); + +// Soapbox team follow pack naddr (same as used on About page) +const SOAPBOX_TEAM_NADDR = 'naddr1qvzqqqyckypzpyexz3t34l966ngh5xg7u2q788hthdqmj0av3lv8s2tz9t43zt6dqqxxkdrsx4mnqm3jxfeh2ess5pyrw'; + +export interface AppSubmission extends NostrEvent { + appName: string; + websiteUrl: string; + repositoryUrl: string; + description: string; + appIconUrl: string; + screenshotUrl: string; + appTags: string[]; + authorNpub: string; + isFeatured: boolean; + isApproved: boolean; + isHidden: boolean; + isHomepage: boolean; +} + +export function useAppSubmissions() { + const { nostr } = useNostr(); + + return useQuery({ + queryKey: ['app-submissions'], + queryFn: async (): Promise => { + // Get Soapbox team follow pack for auto-approval + let teamPubkeys = new Set(); + try { + const decoded = nip19.decode(SOAPBOX_TEAM_NADDR); + if (decoded.type === 'naddr') { + const addrData = decoded.data; + const teamEvents = await nostr.query([{ + kinds: [addrData.kind], + authors: [addrData.pubkey], + '#d': [addrData.identifier], + limit: 1 + }]); + + if (teamEvents.length > 0) { + const teamEvent = teamEvents[0]; + // Extract pubkeys from 'p' tags + teamEvent.tags + .filter(([name]) => name === 'p') + .forEach(([, pubkey]) => { + if (pubkey) teamPubkeys.add(pubkey); + }); + } + } + } catch (error) { + console.warn('Failed to fetch Soapbox team follow pack:', error); + } + + // Get all app submissions (kind 31733) + const submissionEvents = await nostr.query([{ + kinds: [APP_SUBMISSION_KIND], + '#t': ['soapbox-app-submission'], + limit: 1000 + }]); + + // Get featured app lists from moderators (NIP-51 kind 30267) + const featuredLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-featured-apps'], + limit: 10 + }]); + + // Get approved app lists from moderators (NIP-51 kind 30267) + const approvedLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-approved-apps'], + limit: 10 + }]); + + // Get homepage app lists from moderators (NIP-51 kind 30267) + const homepageLists = await nostr.query([{ + kinds: [30267], + authors: [MODERATOR_HEX], + '#d': ['soapbox-homepage-apps'], + limit: 10 + }]); + + // Get reporting events for hidden apps (NIP-56 kind 1984) + const reportEvents = await nostr.query([{ + kinds: [1984], + authors: [MODERATOR_HEX], + limit: 1000 + }]); + + // Process submissions and apply moderation + const submissions: AppSubmission[] = []; + const submissionMap = new Map(); + + // Group regular submissions by d-tag (identifier) to get latest version + for (const event of submissionEvents) { + const dTag = event.tags.find(tag => tag[0] === 'd')?.[1]; + if (!dTag) continue; + + const existing = submissionMap.get(dTag); + if (!existing || event.created_at > existing.created_at) { + submissionMap.set(dTag, event); + } + } + + // Get the latest featured list + const latestFeaturedList = featuredLists.reduce((latest, current) => + !latest || current.created_at > latest.created_at ? current : latest, + null as NostrEvent | null + ); + + // Get the latest approved list + const latestApprovedList = approvedLists.reduce((latest, current) => + !latest || current.created_at > latest.created_at ? current : latest, + null as NostrEvent | null + ); + + // Get the latest homepage list + const latestHomepageList = homepageLists.reduce((latest, current) => + !latest || current.created_at > latest.created_at ? current : latest, + null as NostrEvent | null + ); + + // Extract featured app coordinates from the list + const featuredAppCoords = new Set(); + if (latestFeaturedList) { + latestFeaturedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => featuredAppCoords.add(tag[1])); + } + + // Extract approved app coordinates from the list + const approvedAppCoords = new Set(); + if (latestApprovedList) { + latestApprovedList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => approvedAppCoords.add(tag[1])); + } + + // Extract homepage app coordinates from the list + const homepageAppCoords = new Set(); + if (latestHomepageList) { + latestHomepageList.tags + .filter(tag => tag[0] === 'a') + .forEach(tag => homepageAppCoords.add(tag[1])); + } + + // Get hidden app coordinates from reports + const hiddenAppCoords = new Set(); + const appReports = new Map(); + + for (const report of reportEvents) { + // Look for app coordinate in 'a' tags + const aTag = report.tags.find(tag => tag[0] === 'a'); + if (!aTag || !aTag[1]) continue; + + const appCoord = aTag[1]; + const reportType = aTag[2]; + + // Check if this is a moderation label + const moderationLabel = report.tags.find(tag => + tag[0] === 'l' && tag[2] === 'soapbox.moderation' + )?.[1]; + + if (moderationLabel === 'hidden' && (reportType === 'spam' || reportType === 'other')) { + if (!appReports.has(appCoord)) { + appReports.set(appCoord, { hidden: 0, unhidden: 0 }); + } + appReports.get(appCoord)!.hidden = Math.max( + appReports.get(appCoord)!.hidden, + report.created_at + ); + } else if (moderationLabel === 'unhidden' && reportType === 'other') { + if (!appReports.has(appCoord)) { + appReports.set(appCoord, { hidden: 0, unhidden: 0 }); + } + appReports.get(appCoord)!.unhidden = Math.max( + appReports.get(appCoord)!.unhidden, + report.created_at + ); + } + } + + // Determine which apps are currently hidden (latest action wins) + for (const [appCoord, reports] of appReports) { + if (reports.hidden > reports.unhidden) { + hiddenAppCoords.add(appCoord); + } + } + + // Convert to AppSubmission objects + for (const [dTag, event] of submissionMap) { + try { + const appName = event.tags.find(tag => tag[0] === 'title')?.[1] || ''; + const websiteUrl = event.tags.find(tag => tag[0] === 'website')?.[1] || ''; + const repositoryUrl = event.tags.find(tag => tag[0] === 'repository')?.[1] || ''; + const appIconUrl = event.tags.find(tag => tag[0] === 'icon')?.[1] || ''; + const screenshotUrl = event.tags.find(tag => tag[0] === 'screenshot')?.[1] || ''; + const authorNpub = event.tags.find(tag => tag[0] === 'author')?.[1] || event.pubkey; + const appTags = event.tags.filter(tag => tag[0] === 'app-tag').map(tag => tag[1]); + + // Check if app is featured, approved, homepage, or hidden + const appCoordinate = `${APP_SUBMISSION_KIND}:${event.pubkey}:${dTag}`; + const isFeatured = featuredAppCoords.has(appCoordinate); + const isHomepage = homepageAppCoords.has(appCoordinate); + const isSubmittedByModerator = event.pubkey === MODERATOR_HEX; + const isSubmittedByTeamMember = teamPubkeys.has(event.pubkey); + const isApproved = approvedAppCoords.has(appCoordinate) || isFeatured || isSubmittedByModerator || isSubmittedByTeamMember; + const isHidden = hiddenAppCoords.has(appCoordinate); + + submissions.push({ + ...event, + appName, + websiteUrl, + repositoryUrl, + description: event.content, + appIconUrl, + screenshotUrl, + appTags: appTags, + authorNpub, + isFeatured, + isApproved, + isHidden, + isHomepage + }); + } catch (error) { + console.warn('Failed to parse app submission:', error); + } + } + + return submissions; + }, + staleTime: 30000, // 30 seconds + refetchInterval: 60000, // 1 minute + }); +} + +export function useUserAppSubmissions(userPubkey?: string) { + const { data: allSubmissions, ...rest } = useAppSubmissions(); + + const userSubmissions = allSubmissions?.filter(app => app.pubkey === userPubkey) || []; + + return { + data: userSubmissions, + ...rest + }; +} \ No newline at end of file diff --git a/src/lib/utils.ts b/src/lib/utils.ts index bd0c391d..bc146526 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -4,3 +4,15 @@ import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } + +/** + * Shuffles an array using the Fisher-Yates algorithm + */ +export function shuffleArray(array: T[]): T[] { + const shuffled = [...array]; + for (let i = shuffled.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]]; + } + return shuffled; +} diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 96a7a755..e0e5ac9f 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -23,6 +23,7 @@ import { FileAttachment } from '@/components/ui/file-attachment'; import { ArrowUp } from 'lucide-react'; import { useSeoMeta } from '@unhead/react'; import { ShakespeareLogo } from '@/components/ShakespeareLogo'; +import { AppShowcase } from '@/components/AppShowcase'; export default function Index() { const { t } = useTranslation(); @@ -375,6 +376,9 @@ export default function Index() { + + {/* App Showcase */} + {/* Onboarding Dialog */} From c65b8ff1b969b714f07ca023d550e4ff6b00f3e0 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Sun, 12 Oct 2025 18:54:31 -0500 Subject: [PATCH 2/5] Remove showcase header, search bar, and tag filters - Remove "Community Showcase" title and subtitle - Remove search bar functionality - Remove tag filtering UI and logic - Simplify component to show all apps without filters - Keep section headers for Featured Apps, Halloween Hackathon, All Apps, and Templates - Maintain collapsible "All Apps" section - Clean up unused imports and state variables --- src/components/AppShowcase.tsx | 416 +++++++++------------------------ 1 file changed, 105 insertions(+), 311 deletions(-) diff --git a/src/components/AppShowcase.tsx b/src/components/AppShowcase.tsx index a3eb858c..a2a6e75b 100644 --- a/src/components/AppShowcase.tsx +++ b/src/components/AppShowcase.tsx @@ -1,12 +1,10 @@ -import React, { useState, useMemo, useEffect } from "react"; -import { Plus, Search, Filter, Eye, EyeOff } from "lucide-react"; +import React, { useState, useMemo } from "react"; +import { Search } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; -import { Input } from "@/components/ui/input"; import { useCurrentUser } from "@/hooks/useCurrentUser"; import { useAppSubmissions } from "@/hooks/useAppSubmissions"; import { AppShowcaseCard } from "@/components/AppShowcaseCard"; -import { useIsMobile } from "@/hooks/useIsMobile"; import { Collapsible, CollapsibleContent, @@ -22,11 +20,7 @@ import { RelaySelector } from "@/components/RelaySelector"; export function AppShowcase() { const { user } = useCurrentUser(); const { data: submissions = [], isLoading } = useAppSubmissions(); - const isMobile = useIsMobile(); - const [searchTerm, setSearchTerm] = useState(""); - const [selectedTag, setSelectedTag] = useState(null); const [showAllApps, setShowAllApps] = useState(false); - const [showAllTags, setShowAllTags] = useState(false); const MODERATOR_NPUB = 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc'; const MODERATOR_HEX = (() => { @@ -72,74 +66,10 @@ export function AppShowcase() { [nonHalloweenSubmissions] ); - // Apply search and tag filters - const filterApps = (apps: AppSubmission[]) => { - return apps.filter(app => { - const matchesSearch = !searchTerm || - app.appName.toLowerCase().includes(searchTerm.toLowerCase()) || - app.description.toLowerCase().includes(searchTerm.toLowerCase()) || - app.appTags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); - - const matchesTag = !selectedTag || app.appTags.includes(selectedTag); - - return matchesSearch && matchesTag; - }); - }; - - const filteredFeaturedApps = filterApps(featuredApps); - const filteredHalloweenApps = filterApps(halloweenApps); - const filteredApprovedApps = filterApps(approvedApps); - const filteredTemplateApps = filterApps(templateApps); - - // Get all unique tags from approved and featured apps only (exclude pending, hidden, and template apps) - const allTags = Array.from(new Set([...featuredApps, ...approvedApps].flatMap(app => app.appTags))).sort(); - - // Get the most popular tags based on frequency (excluding Halloween Hackathon 2025 tag) - const tagCounts = new Map(); - [...featuredApps, ...approvedApps, ...templateApps].forEach(app => { - app.appTags.forEach(tag => { - // Don't include Halloween Hackathon 2025 in the tag filters - if (tag !== 'Halloween Hackathon 2025') { - tagCounts.set(tag, (tagCounts.get(tag) || 0) + 1); - } - }); - }); - - const sortedTags = Array.from(tagCounts.entries()) - .sort((a, b) => b[1] - a[1]) // Sort by count descending - .map(([tag]) => tag); // Extract just the tag names - - // Always show Template as the first tag if templates exist - const topTags: string[] = []; - if (templateApps.length > 0) { - topTags.push('Template'); - // Remove Template from sortedTags to avoid duplication - const templateIndex = sortedTags.indexOf('Template'); - if (templateIndex > -1) { - sortedTags.splice(templateIndex, 1); - } - } - - // Show fewer tags on mobile, more on desktop - const maxTagsToShow = isMobile ? 3 : 5; - const availableSlots = maxTagsToShow - topTags.length; - const popularTags = [...topTags, ...sortedTags.slice(0, availableSlots)]; - const remainingTags = sortedTags.slice(availableSlots); - - const handleTagSelect = (tag: string | null) => { - setSelectedTag(tag); - }; - // Don't show showcase if no apps exist if (isLoading) { return (
-
-

Community Showcase

-

- Discover amazing applications built by our community -

-
{Array.from({ length: 6 }).map((_, i) => ( @@ -176,12 +106,6 @@ export function AppShowcase() { if (!submissions.length) { return (
-
-

Community Showcase

-

- Discover amazing applications built by our community -

-
@@ -198,247 +122,117 @@ export function AppShowcase() { return (
- {/* Header */} -
-

Community Showcase

-

- Discover amazing applications built by our community -

- - {/* Search and Filter */} -
-
- - setSearchTerm(e.target.value)} - className="pl-10" - /> -
- - {/* Tag Filters */} -
-
- - {popularTags.map((tag) => ( - - ))} - - {/* Show More Tags Button */} - {remainingTags.length > 0 && ( - - )} -
- - {/* Additional Tags (Collapsible) */} - {showAllTags && remainingTags.length > 0 && ( -
- {remainingTags.map((tag) => ( - - ))} -
- )} -
-
-
- {/* Apps Grid */}
- {/* When Template tag is selected, show only Templates */} - {selectedTag === 'Template' ? ( - <> - {/* Templates Section */} - {filteredTemplateApps.length > 0 && ( -
-
-
- 📋 -
-
-

Templates

-

Ready-to-use templates to kickstart your project

-
-
-
- {filteredTemplateApps.slice(0, 6).map((app) => ( - - ))} -
+ {/* Featured Apps */} + {featuredApps.length > 0 && ( +
+
+
+ ⭐
- )} - - ) : ( - <> - {/* Featured Apps */} - {filteredFeaturedApps.length > 0 && (
-
-
- ⭐ -
-
-

Featured Apps

-

Handpicked applications showcasing the best of our community

-
-
-
- {filteredFeaturedApps.slice(0, 6).map((app) => ( - - ))} -
+

Featured Apps

+

Handpicked applications showcasing the best of our community

- )} - - {/* Halloween Hackathon 2025 Apps */} - {filteredHalloweenApps.length > 0 && ( -
-
-
- 🎃 -
-
-

Halloween Hackathon 2025

-

Featured spooky creations from our Halloween hackathon

-
-
-
- {filteredHalloweenApps.slice(0, 6).map((app) => ( - - ))} -
-
- )} - - {/* All Apps (Approved) - Collapsible */} - {filteredApprovedApps.length > 0 && ( -
- - - - - -
- {filteredApprovedApps.map((app) => ( - - ))} -
-
-
-
- )} - - {/* Templates Section */} - {filteredTemplateApps.length > 0 && ( -
-
-
- 📋 -
-
-

Templates

-

Ready-to-use templates to kickstart your project

-
-
-
- {filteredTemplateApps.slice(0, 6).map((app) => ( - - ))} -
-
- )} - +
+
+ {featuredApps.slice(0, 6).map((app) => ( + + ))} +
+
)} - {/* Empty State */} - {(() => { - if (selectedTag === 'Template') { - return filteredTemplateApps.length === 0; - } - return filteredFeaturedApps.length === 0 && filteredHalloweenApps.length === 0 && filteredApprovedApps.length === 0 && filteredTemplateApps.length === 0; - })() && ( -
-
- + {/* Halloween Hackathon 2025 Apps */} + {halloweenApps.length > 0 && ( +
+
+
+ 🎃 +
+
+

Halloween Hackathon 2025

+

Featured spooky creations from our Halloween hackathon

+
+
+
+ {halloweenApps.slice(0, 6).map((app) => ( + + ))} +
+
+ )} + + {/* All Apps (Approved) - Collapsible */} + {approvedApps.length > 0 && ( +
+ + + + + +
+ {approvedApps.map((app) => ( + + ))} +
+
+
+
+ )} + + {/* Templates Section */} + {templateApps.length > 0 && ( +
+
+
+ 📋 +
+
+

Templates

+

Ready-to-use templates to kickstart your project

+
+
+
+ {templateApps.slice(0, 6).map((app) => ( + + ))}
-

- {selectedTag === 'Template' ? 'No templates found' : 'No apps found'} -

-

- {searchTerm || selectedTag - ? "Try adjusting your search or filters" - : "Be the first to submit an app to the showcase!" - } -

)}
From fd8cda9ea8e604b08a42f2a4169f2b7df4333be5 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Sun, 12 Oct 2025 18:58:45 -0500 Subject: [PATCH 3/5] Simplify app showcase cards - Remove status badges (Featured, Homepage, Pending) from top-left corner - Remove app tags display from card content - Remove repository link/button, keeping only Shakespeare badge and visit app button - Clean up unused imports (Badge, GitBranch, Copy icons) - Streamline card layout for cleaner appearance --- src/components/AppShowcase.tsx | 1 - src/components/AppShowcaseCard.tsx | 70 +----------------------------- 2 files changed, 1 insertion(+), 70 deletions(-) diff --git a/src/components/AppShowcase.tsx b/src/components/AppShowcase.tsx index a2a6e75b..9f776ecb 100644 --- a/src/components/AppShowcase.tsx +++ b/src/components/AppShowcase.tsx @@ -1,7 +1,6 @@ import React, { useState, useMemo } from "react"; import { Search } from "lucide-react"; import { Button } from "@/components/ui/button"; -import { Badge } from "@/components/ui/badge"; import { useCurrentUser } from "@/hooks/useCurrentUser"; import { useAppSubmissions } from "@/hooks/useAppSubmissions"; import { AppShowcaseCard } from "@/components/AppShowcaseCard"; diff --git a/src/components/AppShowcaseCard.tsx b/src/components/AppShowcaseCard.tsx index 90fb33e4..b979e784 100644 --- a/src/components/AppShowcaseCard.tsx +++ b/src/components/AppShowcaseCard.tsx @@ -1,10 +1,8 @@ import React, { useState } from 'react'; -import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { ExternalLink, - GitBranch, Edit, Star, StarOff, @@ -15,8 +13,7 @@ import { XCircle, User, Home, - Contact, - Copy + Contact } from 'lucide-react'; import { DropdownMenu, @@ -400,28 +397,6 @@ export function AppShowcaseCard({ app, onEdit, showModerationControls, hideAppro )} - {/* Status Badges */} -
- {app.isFeatured && ( - - - Featured - - )} - {app.isHomepage && isModerator && ( - - - Homepage - - )} - {!app.isApproved && !hideApprovalStatus && ( - - - Pending - - )} -
- {/* Actions Menu */} {(isOwner || showModerationControls) && (
@@ -580,22 +555,6 @@ export function AppShowcaseCard({ app, onEdit, showModerationControls, hideAppro
- {/* Tags */} - {app.appTags.length > 0 && ( -
- {app.appTags.slice(0, 3).map((tag) => ( - - {tag} - - ))} - {app.appTags.length > 3 && ( - - +{app.appTags.length - 3} more - - )} -
- )} - {/* Spacer to push action links to bottom */}
@@ -623,33 +582,6 @@ export function AppShowcaseCard({ app, onEdit, showModerationControls, hideAppro - {app.repositoryUrl.startsWith('nostr://') ? ( - - ) : ( - - )}
From d52d6d900d77a77d4b3d75f1a99fad16062d35d6 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Sun, 12 Oct 2025 19:00:55 -0500 Subject: [PATCH 4/5] Move and rename "All Apps" section to "More Apps" - Move "More Apps" section to appear after Templates section - Rename from "All Apps" to "More Apps" - Update subtitle from "all approved community apps" to "more community apps" - Maintain collapsible functionality --- src/components/AppShowcase.tsx | 74 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/components/AppShowcase.tsx b/src/components/AppShowcase.tsx index 9f776ecb..7dbbc35d 100644 --- a/src/components/AppShowcase.tsx +++ b/src/components/AppShowcase.tsx @@ -173,43 +173,6 @@ export function AppShowcase() {
)} - {/* All Apps (Approved) - Collapsible */} - {approvedApps.length > 0 && ( -
- - - - - -
- {approvedApps.map((app) => ( - - ))} -
-
-
-
- )} - {/* Templates Section */} {templateApps.length > 0 && (
@@ -234,6 +197,43 @@ export function AppShowcase() {
)} + + {/* More Apps (Approved) - Collapsible */} + {approvedApps.length > 0 && ( +
+ + + + + +
+ {approvedApps.map((app) => ( + + ))} +
+
+
+
+ )}
); From 05682be5877597caeb666a0d42470941617741a8 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Sun, 12 Oct 2025 19:09:16 -0500 Subject: [PATCH 5/5] Widen app showcase container to match original soapbox layout - Change max-width from max-w-4xl (896px) to max-w-7xl (1280px) - Add responsive padding (px-4 sm:px-6 lg:px-8) to match original - Apply to all showcase states: loading, empty, and main content - Apps now have the same width as the original soapbox showcase --- src/components/AppShowcase.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AppShowcase.tsx b/src/components/AppShowcase.tsx index 7dbbc35d..11c643f6 100644 --- a/src/components/AppShowcase.tsx +++ b/src/components/AppShowcase.tsx @@ -68,7 +68,7 @@ export function AppShowcase() { // Don't show showcase if no apps exist if (isLoading) { return ( -
+
{Array.from({ length: 6 }).map((_, i) => ( @@ -104,7 +104,7 @@ export function AppShowcase() { if (!submissions.length) { return ( -
+
@@ -120,7 +120,7 @@ export function AppShowcase() { } return ( -
+
{/* Apps Grid */}
{/* Featured Apps */}