The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
missed a few spots
Steven Teya5f3141b9470
diff --git a/apps/web/lib/qr/index.tsx b/apps/web/lib/qr/index.tsxindex a23d58550b..7ad9111eea 100644--- a/apps/web/lib/qr/index.tsx+++ b/apps/web/lib/qr/index.tsx@@ -344,12 +344,13 @@ export function getQRData({fgColor,hideLogo,logo,+ margin,}: {url: string;fgColor?: string;hideLogo?: boolean;logo?: string;- scale?: number;+ margin?: number;}) {return {value: `${url}?qr=1`,@@ -358,7 +359,7 @@ export function getQRData({size: 1024,level: "Q", // QR Code error correction level: https://blog.qrstuff.com/general/qr-code-error-correctionhideLogo,- includeMargin: true,+ margin,...(!hideLogo && {imageSettings: {src: logo || DUB_QR_LOGO,diff --git a/apps/web/ui/shared/qr-code.tsx b/apps/web/ui/shared/qr-code.tsxindex 7664d3f196..79ab150cc5 100644--- a/apps/web/ui/shared/qr-code.tsx+++ b/apps/web/ui/shared/qr-code.tsx@@ -1,4 +1,5 @@import { getQRData, QRCodeSVG } from "@/lib/qr";+import { DEFAULT_MARGIN } from "@/lib/qr/constants";import { useMemo } from "react";export function QRCode({@@ -7,16 +8,18 @@ export function QRCode({hideLogo,logo,scale = 1,+ margin = DEFAULT_MARGIN,}: {url: string;fgColor?: string;hideLogo?: boolean;logo?: string;scale?: number;+ margin?: number;}) {const qrData = useMemo(- () => getQRData({ url, fgColor, hideLogo, logo }),- [url, fgColor, hideLogo, logo],+ () => getQRData({ url, fgColor, hideLogo, logo, margin }),+ [url, fgColor, hideLogo, logo, margin],);return (@@ -26,7 +29,7 @@ export function QRCode({bgColor={qrData.bgColor}fgColor={qrData.fgColor}level={qrData.level}- includeMargin={true}+ margin={qrData.margin}{...(qrData.imageSettings && {imageSettings: {...qrData.imageSettings,