From 5084353afeb15f41989a120c6fd9f90198e758e6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 30 Oct 2025 12:23:10 -0500 Subject: [PATCH] Copy the full giftcard URL in the credits dialog --- src/components/CreditsDialog.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/CreditsDialog.tsx b/src/components/CreditsDialog.tsx index b8cb506b..76f3dd29 100644 --- a/src/components/CreditsDialog.tsx +++ b/src/components/CreditsDialog.tsx @@ -554,7 +554,14 @@ export function CreditsDialog({ open, onOpenChange, provider }: CreditsDialogPro }; const handleCopyCode = (code: string) => { - navigator.clipboard.writeText(code); + // Create the full shareable URL for the gift card + const url = new URL('/giftcard', window.location.origin); + url.hash = new URLSearchParams({ + baseURL: provider.baseURL, + code: code, + }).toString(); + + navigator.clipboard.writeText(url.toString()); setCopiedCode(code); setTimeout(() => setCopiedCode(null), 2000); };