The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update cacheDeepLinkClickData to use LOCALHOST_IP for local development; improve logging for missing IP addresses. Refactor SVG icons to use clipPath instead of clip-path for consistency.
Kiran K619dee60ba44
diff --git a/apps/web/lib/middleware/utils/cache-deeplink-click-data.ts b/apps/web/lib/middleware/utils/cache-deeplink-click-data.tsindex 10d05fb6d7..6f3830a216 100644--- a/apps/web/lib/middleware/utils/cache-deeplink-click-data.ts+++ b/apps/web/lib/middleware/utils/cache-deeplink-click-data.ts@@ -1,4 +1,5 @@import { redis } from "@/lib/upstash";+import { LOCALHOST_IP } from "@dub/utils";import { ipAddress } from "@vercel/functions";export type DeepLinkClickData = {@@ -15,9 +16,14 @@ export async function cacheDeepLinkClickData({clickId: string;link: { id: string; domain: string; key: string; url: string };}) {- const ip = ipAddress(req);+ const ip = process.env.VERCEL === "1" ? ipAddress(req) : LOCALHOST_IP;++ // skip caching if ip address is not presentif (!ip) {- return; // skip caching if ip address is not present+ console.log(+ `Skipping cache for ${link.domain}:${link.key} because ip is not present.`,+ );+ return;}return await redis.set<DeepLinkClickData>(diff --git a/apps/web/ui/guides/icons/appwrite.tsx b/apps/web/ui/guides/icons/appwrite.tsxindex 42962abfcb..a32d9fec97 100644--- a/apps/web/ui/guides/icons/appwrite.tsx+++ b/apps/web/ui/guides/icons/appwrite.tsx@@ -10,7 +10,7 @@ export function Appwrite(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_112143)">+ <g clipPath="url(#clip0_18024_112143)"><pathd="M45.3735 30.0004V40H20.3107C13.0086 40 6.63315 35.9783 3.22183 29.9996C1.71291 27.3508 0.825926 24.3936 0.62793 21.3516V18.6484C0.716855 17.2602 0.950569 15.8851 1.32527 14.5455C3.66656 6.15098 11.2801 0 20.3107 0C29.3413 0 36.9532 6.15098 39.2945 14.5455H28.5777C26.8187 11.8092 23.7742 9.99958 20.3107 9.99958C16.8472 9.99958 13.802 11.8092 12.0429 14.5455C11.4999 15.3879 11.087 16.3073 10.818 17.2728C10.5708 18.1607 10.446 19.0783 10.447 20C10.447 22.8664 11.6354 25.4495 13.5419 27.2732C15.3603 29.0237 17.7866 30.001 20.3107 29.9996L45.3735 30.0004Z"fill="url(#paint0_linear_18024_112143)"diff --git a/apps/web/ui/guides/icons/better-auth.tsx b/apps/web/ui/guides/icons/better-auth.tsxindex f8f69631e6..b6800d1526 100644--- a/apps/web/ui/guides/icons/better-auth.tsx+++ b/apps/web/ui/guides/icons/better-auth.tsx@@ -10,7 +10,7 @@ export function BetterAuth(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_112090)">+ <g clipPath="url(#clip0_18024_112090)"><path d="M0 0H40V40H0V0Z" fill="black" /><pathd="M5.51953 9.68018H12.4786V30.4002H5.51953V9.68018ZM27.0055 9.68018H34.3995V30.4002H27.0055V9.68018Z"diff --git a/apps/web/ui/guides/icons/framer.tsx b/apps/web/ui/guides/icons/framer.tsxindex fa2a9c5ddb..c8922e9d6f 100644--- a/apps/web/ui/guides/icons/framer.tsx+++ b/apps/web/ui/guides/icons/framer.tsx@@ -10,7 +10,7 @@ export function Framer(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_111660)">+ <g clipPath="url(#clip0_18024_111660)"><pathd="M0.667969 0H27.3346V13.3333H14.0013L0.667969 0ZM0.667969 13.3333H14.0013L27.3346 26.6667H14.0013V40L0.667969 26.6667V13.3333Z"fill="black"diff --git a/apps/web/ui/guides/icons/next-auth.tsx b/apps/web/ui/guides/icons/next-auth.tsxindex f016ff1755..a9e089a243 100644--- a/apps/web/ui/guides/icons/next-auth.tsx+++ b/apps/web/ui/guides/icons/next-auth.tsx@@ -10,7 +10,7 @@ export function NextAuth(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_112096)">+ <g clipPath="url(#clip0_18024_112096)"><pathfill-rule="evenodd"clip-rule="evenodd"diff --git a/apps/web/ui/guides/icons/react.tsx b/apps/web/ui/guides/icons/react.tsxindex f4a5bd94a2..f052bdc629 100644--- a/apps/web/ui/guides/icons/react.tsx+++ b/apps/web/ui/guides/icons/react.tsx@@ -10,7 +10,7 @@ export function React(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_111663)">+ <g clipPath="url(#clip0_18024_111663)"><pathd="M23.0781 15.7031C20.7266 15.7031 18.8203 17.6094 18.8203 19.9609C18.8203 22.3125 20.7266 24.2188 23.0781 24.2188C25.4296 24.2188 27.3359 22.3125 27.3359 19.9609C27.3359 17.6094 25.4296 15.7031 23.0781 15.7031Z"fill="#087EA4"diff --git a/apps/web/ui/guides/icons/wordpress.tsx b/apps/web/ui/guides/icons/wordpress.tsxindex ecfb480f85..39e2180094 100644--- a/apps/web/ui/guides/icons/wordpress.tsx+++ b/apps/web/ui/guides/icons/wordpress.tsx@@ -10,7 +10,7 @@ export function Wordpress(props: SVGProps<SVGSVGElement>) {xmlns="http://www.w3.org/2000/svg"{...props}>- <g clip-path="url(#clip0_18024_111652)">+ <g clipPath="url(#clip0_18024_111652)"><pathd="M2.84375 19.9996C2.84375 26.7908 6.79044 32.6598 12.5134 35.441L4.32919 13.0171C3.3772 15.1509 2.84375 17.5122 2.84375 19.9996Z"fill="#21759B"diff --git a/packages/ui/src/icons/ios-app-store.tsx b/packages/ui/src/icons/ios-app-store.tsxindex cfae402c8b..97e8718672 100644--- a/packages/ui/src/icons/ios-app-store.tsx+++ b/packages/ui/src/icons/ios-app-store.tsx@@ -8,7 +8,7 @@ export function IOSAppStore({ className }: { className?: string }) {xmlns="http://www.w3.org/2000/svg"className={className}>- <g clip-path="url(#clip0_24804_74166)">+ <g clipPath="url(#clip0_24804_74166)"><pathd="M19.652 0L5.348 0C2.669 0 0.5 2.169 0.5 4.848L0.5 19.155C0.5 21.831 2.669 24 5.348 24H19.655C22.331 24 24.503 21.831 24.503 19.152V4.848C24.5 2.169 22.331 0 19.652 0Z"fill="url(#paint0_linear_24804_74166)"@@ -27,8 +27,8 @@ export function IOSAppStore({ className }: { className?: string }) {y2="24"gradientUnits="userSpaceOnUse">- <stop stop-color="#18BFFB" />- <stop offset="1" stop-color="#2072F3" />+ <stop stopColor="#18BFFB" />+ <stop offset="1" stopColor="#2072F3" /></linearGradient><clipPath id="clip0_24804_74166"><rect