The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Copy Image Feature
Max Programmingd38640a56518
diff --git a/components/app/modals/link-qr-modal.tsx b/components/app/modals/link-qr-modal.tsxindex 95d59ff42c..f5cd3b1bfe 100644--- a/components/app/modals/link-qr-modal.tsx+++ b/components/app/modals/link-qr-modal.tsx@@ -7,12 +7,13 @@ import {useState,} from "react";import { HexColorInput, HexColorPicker } from "react-colorful";+import { copyImageToClipboard } from "copy-image-clipboard";import BlurImage from "@/components/shared/blur-image";-import { ChevronRight, Copy, Download, Logo } from "@/components/shared/icons";+import { ChevronRight, Copy, Logo } from "@/components/shared/icons";import Modal from "@/components/shared/modal";import Switch from "@/components/shared/switch";import Tooltip, { TooltipContent } from "@/components/shared/tooltip";-import { QRCodeSVG, getQRAsCanvas, getQRAsSVGDataUri } from "@/lib/qr";+import { QRCodeSVG, getQRAsCanvas } from "@/lib/qr";import useProject from "@/lib/swr/use-project";import useUsage from "@/lib/swr/use-usage";import { SimpleLinkProps } from "@/lib/types";@@ -124,7 +125,7 @@ function LinkQRModalHelper({<div className="flex gap-2 px-4 sm:px-16"><buttononClick={async () =>- download(await getQRAsCanvas(qrData, "image/png"), "png")+ copyImageToClipboard(await getQRAsCanvas(qrData, "image/png"))}className="flex w-full items-center justify-center gap-2 rounded-md border border-black bg-black py-1.5 px-5 text-sm text-white transition-all hover:bg-white hover:text-black">diff --git a/package.json b/package.jsonindex beef297477..584aa28218 100644--- a/package.json+++ b/package.json@@ -34,6 +34,7 @@"@visx/tooltip": "^2.10.0","cloudinary": "^1.32.0","cobe": "^0.6.2",+ "copy-image-clipboard": "^2.1.2","focus-trap-react": "^10.0.0","framer-motion": "^7.6.2","html-escaper": "^3.0.3",diff --git a/yarn.lock b/yarn.lockindex af609e17d3..8305eac32c 100644--- a/yarn.lock+++ b/yarn.lock@@ -2394,6 +2394,11 @@ cookie@^0.4.1:resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz"integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==+copy-image-clipboard@^2.1.2:+ version "2.1.2"+ resolved "https://registry.yarnpkg.com/copy-image-clipboard/-/copy-image-clipboard-2.1.2.tgz#7965038faa036b1aed451df207f14b52838286a1"+ integrity sha512-3VCXVl2IpFfOyD8drv9DozcNlwmqBqxOlsgkEGyVAzadjlPk1go8YNZyy8QmTnwHPxSFpeCR9OdsStEdVK7qDA==+core-js@^2.4.0:version "2.6.12"resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"