The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
default includeMargin to true
Kyle Zheng97b1b7f2438e
diff --git a/apps/web/lib/qr/constants.ts b/apps/web/lib/qr/constants.tsindex 73fd0b49b9..f7565cb908 100644--- a/apps/web/lib/qr/constants.ts+++ b/apps/web/lib/qr/constants.ts@@ -11,9 +11,9 @@ export const DEFAULT_SIZE = 128;export const DEFAULT_LEVEL = "L";export const DEFAULT_BGCOLOR = "#FFFFFF";export const DEFAULT_FGCOLOR = "#000000";-export const DEFAULT_INCLUDEMARGIN = false;+export const DEFAULT_INCLUDEMARGIN = true;-export const MARGIN_SIZE = 4;+export const MARGIN_SIZE = 2;export const QR_LEVELS = ["L", "M", "Q", "H"] as const;diff --git a/apps/web/lib/qr/index.tsx b/apps/web/lib/qr/index.tsxindex a107259e95..b996a3d8e3 100644--- a/apps/web/lib/qr/index.tsx+++ b/apps/web/lib/qr/index.tsx@@ -362,7 +362,7 @@ export function getQRData({size: 1024,level: "Q", // QR Code error correction level: https://blog.qrstuff.com/general/qr-code-error-correctionhideLogo,- includeMargin: false,+ includeMargin: true,...(!hideLogo && {imageSettings: {src: logo || DUB_QR_LOGO,diff --git a/apps/web/lib/zod/schemas/qr.ts b/apps/web/lib/zod/schemas/qr.tsindex 7872181a12..7123d1584c 100644--- a/apps/web/lib/zod/schemas/qr.ts+++ b/apps/web/lib/zod/schemas/qr.ts@@ -54,6 +54,6 @@ export const getQRCodeQuerySchema = z.object({.optional().default(`${DEFAULT_INCLUDEMARGIN}`).describe(- "Whether to include a margin around the QR code. Defaults to `false` if not provided.",+ "Whether to include a margin around the QR code. Defaults to `true` if not provided.",),});diff --git a/apps/web/ui/shared/qr-code.tsx b/apps/web/ui/shared/qr-code.tsxindex 45880988bb..7664d3f196 100644--- a/apps/web/ui/shared/qr-code.tsx+++ b/apps/web/ui/shared/qr-code.tsx@@ -26,7 +26,7 @@ export function QRCode({bgColor={qrData.bgColor}fgColor={qrData.fgColor}level={qrData.level}- includeMargin={false}+ includeMargin={true}{...(qrData.imageSettings && {imageSettings: {...qrData.imageSettings,