The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Added NEXT_PUBLIC_VERCEL and NEXT_PUBLIC_VERCEL_URL
Steven Tey6860ad7632db
diff --git a/.env.production b/.env.productionnew file mode 100644index 0000000000..67166d8cce--- /dev/null+++ b/.env.production@@ -0,0 +1,2 @@+NEXT_PUBLIC_VERCEL=${VERCEL}+NEXT_PUBLIC_VERCEL_URL=${VERCEL_URL}\ No newline at end of filediff --git a/components/link-card.tsx b/components/link-card.tsxindex 4a83f7f912..c868f22bc9 100644--- a/components/link-card.tsx+++ b/components/link-card.tsx@@ -13,8 +13,8 @@ export default function LinkCard({url: string;}) {const shortURL = `${- process.env.VERCEL === "1"- ? process.env.VERCEL_URL+ process.env.NEXT_PUBLIC_VERCEL === "1"+ ? process.env.NEXT_PUBLIC_VERCEL_URL: "http://localhost:3000"}/${key}`; // if you're self-hosting you can just replace this with your own domain