diff --git a/src/app/mcp/page.tsx b/src/app/mcp/page.tsx index 0c78bcab..7bb6d135 100644 --- a/src/app/mcp/page.tsx +++ b/src/app/mcp/page.tsx @@ -9,6 +9,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import { Server, Star, Download, Zap } from "lucide-react"; import { MCP_CATEGORIES } from "@/lib/constants"; +import { CopyLinkButton } from "@/components/ui/CopyLinkButton"; export const metadata: Metadata = { title: "MCP Server Marketplace | ugig.net", @@ -228,6 +229,7 @@ async function McpList({ searchParams }: { searchParams: McpPageProps["searchPar {listing.downloads_count} + diff --git a/src/app/prompts/page.tsx b/src/app/prompts/page.tsx index 20f561bc..36d8a6ad 100644 --- a/src/app/prompts/page.tsx +++ b/src/app/prompts/page.tsx @@ -9,6 +9,7 @@ import { Skeleton } from "@/components/ui/skeleton"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import { FileText, Star, Download, Zap } from "lucide-react"; import { PROMPT_CATEGORIES } from "@/lib/constants"; +import { CopyLinkButton } from "@/components/ui/CopyLinkButton"; export const metadata: Metadata = { title: "Prompt Marketplace | ugig.net", @@ -238,6 +239,7 @@ async function PromptList({ searchParams }: { searchParams: PromptsPageProps["se {listing.downloads_count} + diff --git a/src/components/agents/AgentCard.tsx b/src/components/agents/AgentCard.tsx index ad6c0240..bc1904b3 100644 --- a/src/components/agents/AgentCard.tsx +++ b/src/components/agents/AgentCard.tsx @@ -9,6 +9,7 @@ import { ReputationBadge } from "@/components/ui/ReputationBadge"; import { MapPin, DollarSign, Coins, CheckCircle, Clock } from "lucide-react"; import { formatRelativeTime } from "@/lib/utils"; import { ZapButton } from "@/components/zaps/ZapButton"; +import { CopyLinkButton } from "@/components/ui/CopyLinkButton"; import type { Profile } from "@/types"; interface AgentCardProps { @@ -160,6 +161,7 @@ export function AgentCard({ agent, highlightTags = [] }: AgentCardProps) { + diff --git a/src/components/gigs/GigCard.tsx b/src/components/gigs/GigCard.tsx index f0f21006..32e13633 100644 --- a/src/components/gigs/GigCard.tsx +++ b/src/components/gigs/GigCard.tsx @@ -7,6 +7,7 @@ import { Badge } from "@/components/ui/badge"; import { AgentBadge } from "@/components/ui/AgentBadge"; import { VerifiedBadge } from "@/components/ui/VerifiedBadge"; import { SaveGigButton } from "./SaveGigButton"; +import { CopyLinkButton } from "@/components/ui/CopyLinkButton"; import { formatCurrency, formatRelativeTime } from "@/lib/utils"; import { linkifyText } from "@/lib/linkify"; import type { Gig, Profile } from "@/types"; @@ -103,6 +104,7 @@ export function GigCard({ {poster?.account_type === "agent" && ( )} + {showSaveButton && ( { + e.preventDefault(); + e.stopPropagation(); + const url = `${window.location.origin}${path}`; + navigator.clipboard.writeText(url).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }); + }; + + return ( + + ); +}