The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
stash changes
Steven Tey151e72d4fbf2
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/page-client.tsxindex 0f0daad833..246dffa1b1 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/page-client.tsx@@ -17,6 +17,7 @@ import { ModalContext } from "@/ui/modals/provider";import Link from "next/link";import { NumberTooltip } from "@dub/ui/src/tooltip";import { nFormatter } from "@dub/utils";+import ProgressBar from "@/ui/shared/progress-bar";export default function ProjectLinksClient() {const { slug, linksUsage, linksLimit } = useProject();@@ -28,24 +29,43 @@ export default function ProjectLinksClient() {<AddEditLinkModal /><div className="flex h-36 items-center border-b border-gray-200 bg-white"><MaxWidthWrapper>- <div className="flex items-center justify-between">- <div className="flex items-end space-x-2">+ <div className="flex flex-col items-center justify-between sm:flex-row">+ {/* <div>+ <div className="flex items-end space-x-8">+ <h1 className="text-2xl text-gray-600">Links</h1>+ <Link+ href={`/${slug}/settings/billing`}+ className="rounded-lg px-2 py-1 transition-all hover:bg-gray-50"+ >+ {linksUsage !== undefined && linksLimit ? (+ <p className="text-sm text-gray-500">+ <NumberTooltip value={linksUsage}>+ <span className="text-xl font-semibold text-black">+ {nFormatter(linksUsage)}{" "}+ </span>+ </NumberTooltip>+ / {nFormatter(linksLimit, { full: true })}+ </p>+ ) : (+ <div className="h-5 w-32 animate-pulse rounded-md bg-gray-200" />+ )}+ </Link>+ </div>+ <ProgressBar+ value={linksUsage}+ max={linksLimit}+ className="mt-2 h-2"+ />+ </div> */}+ <div className="flex flex-col space-y-1"><h1 className="text-2xl text-gray-600">Links</h1>- <Link- href={`/${slug}/settings/billing`}- className="flex items-center space-x-2 rounded-lg px-2 py-1 transition-all hover:bg-gray-50"- >- {linksUsage !== undefined && linksLimit ? (- <p className="text-sm text-gray-600">- <NumberTooltip value={linksUsage}>- <span>{nFormatter(linksUsage)} </span>- </NumberTooltip>- / {nFormatter(linksLimit, { full: true })}- </p>- ) : (- <div className="h-5 w-32 animate-pulse rounded-md bg-gray-200" />- )}- </Link>+ <p className="text-sm text-gray-500">+ Your plan includes{" "}+ <span className="font-medium text-black">+ {nFormatter(linksLimit, { full: true })}+ </span>{" "}+ links per month. Upgrade to add more.+ </p></div><div className="flex"><AddEditLinkButton />diff --git a/apps/web/package.json b/apps/web/package.jsonindex 863ad1d51b..b09874cc73 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -46,7 +46,7 @@"cobe": "^0.6.3","concurrently": "^8.0.1","crisp-sdk-web": "^1.0.19",- "framer-motion": "^10.12.12",+ "framer-motion": "^10.16.16","fuse.js": "^6.6.2","github-slugger": "^2.0.0","he": "^1.2.0",diff --git a/apps/web/ui/shared/progress-bar.tsx b/apps/web/ui/shared/progress-bar.tsxindex 4568c4d514..c90d5a65a1 100644--- a/apps/web/ui/shared/progress-bar.tsx+++ b/apps/web/ui/shared/progress-bar.tsx@@ -1,22 +1,30 @@"use client";+import { cn } from "@dub/utils";import { motion } from "framer-motion";export default function ProgressBar({- value,- max,+ value = 0,+ max = 100,+ className,}: {value?: number;max?: number;+ className?: string;}) {return (- <div className="h-3 w-full overflow-hidden rounded-full bg-gray-200">+ <div+ className={cn(+ "h-3 w-full overflow-hidden rounded-full bg-gray-200",+ className,+ )}+ ><motion.divinitial={{ width: 0 }}animate={{width: value && max ? (value / max) * 100 + "%" : "0%",}}- transition={{ duration: 0.5, type: "spring" }}+ transition={{ duration: 0.5, type: "spring", delay: 0.2 }}className={`${value && max && value > max ? "bg-red-500" : "bg-blue-500"} h-full`}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex bf64dc1c34..91a117d519 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -137,8 +137,8 @@ importers:specifier: ^1.0.19version: 1.0.19framer-motion:- specifier: ^10.12.12- version: 10.12.12([email protected])([email protected])+ specifier: ^10.16.16+ version: 10.16.16([email protected])([email protected])fuse.js:specifier: ^6.6.2version: 6.6.2@@ -650,7 +650,7 @@ importers:version: 1.0.1([email protected])([email protected])'@radix-ui/react-dialog':specifier: 1.0.5+ version: 1.0.5(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-navigation-menu':specifier: ^1.1.2version: 1.1.2([email protected])([email protected])@@ -766,7 +766,7 @@ importers:version: link:../tsconfigtsup:specifier: ^6.1.3- version: 6.1.3([email protected])+ version: 6.1.3([email protected])([email protected])typescript:specifier: ^5.1.6version: 5.1.6@@ -5421,11 +5421,11 @@ packages:'@radix-ui/primitive': 1.0.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])'@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])([email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-focus-guards': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])([email protected])([email protected])+ '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])+ '@radix-ui/react-portal': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])@@ -5544,30 +5544,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==}- peerDependencies:- '@types/react': '*'- '@types/react-dom': '*'- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- peerDependenciesMeta:- '@types/react':- optional: true- '@types/react-dom':- optional: true- dependencies:- '@babel/runtime': 7.23.2- '@radix-ui/primitive': 1.0.1- '@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])- '@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-use-escape-keydown': 1.0.3(@types/[email protected])([email protected])- '@types/react': 18.2.14- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-/@radix-ui/[email protected]([email protected]):resolution: {integrity: sha512-UagjDk4ijOAnGu4WMUPj9ahi7/zJJqNZ9ZAiGPp7waUWJO0O1aWXi/udPphI0IUjvrhBsZJGSN66dR2dsueLWQ==}peerDependencies:@@ -5679,28 +5655,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==}- peerDependencies:- '@types/react': '*'- '@types/react-dom': '*'- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- peerDependenciesMeta:- '@types/react':- optional: true- '@types/react-dom':- optional: true- dependencies:- '@babel/runtime': 7.23.2- '@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])- '@radix-ui/react-use-callback-ref': 1.0.1(@types/[email protected])([email protected])- '@types/react': 18.2.14- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-/@radix-ui/[email protected]([email protected]):resolution: {integrity: sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==}peerDependencies:@@ -5811,12 +5765,12 @@ packages:'@radix-ui/primitive': 1.0.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])'@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])([email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-focus-guards': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])([email protected])([email protected])+ '@radix-ui/react-focus-scope': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])+ '@radix-ui/react-portal': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])@@ -5945,26 +5899,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==}- peerDependencies:- '@types/react': '*'- '@types/react-dom': '*'- react: ^16.8 || ^17.0 || ^18.0- react-dom: ^16.8 || ^17.0 || ^18.0- peerDependenciesMeta:- '@types/react':- optional: true- '@types/react-dom':- optional: true- dependencies:- '@babel/runtime': 7.23.2- '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])- '@types/react': 18.2.14- react: 18.2.0- react-dom: 18.2.0([email protected])- dev: false-resolution: {integrity: sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==}peerDependencies:@@ -6283,10 +6217,10 @@ packages:'@radix-ui/primitive': 1.0.1'@radix-ui/react-compose-refs': 1.0.1(@types/[email protected])([email protected])'@radix-ui/react-context': 1.0.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])([email protected])([email protected])+ '@radix-ui/react-dismissable-layer': 1.0.5(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-id': 1.0.1(@types/[email protected])([email protected])+ '@radix-ui/react-portal': 1.0.4(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-presence': 1.0.1(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])'@radix-ui/react-slot': 1.0.2(@types/[email protected])([email protected])@@ -11048,6 +10982,24 @@ packages:'@emotion/is-prop-valid': 0.8.8dev: false+ resolution: {integrity: sha512-je6j91rd7NmUX7L1XHouwJ4v3R+SO4umso2LUcgOct3rHZ0PajZ80ETYZTajzEXEl9DlKyzjyt4AvGQ+lrebOw==}+ peerDependencies:+ react: ^18.0.0+ react-dom: ^18.0.0+ peerDependenciesMeta:+ react:+ optional: true+ react-dom:+ optional: true+ dependencies:+ react: 18.2.0+ react-dom: 18.2.0([email protected])+ tslib: 2.6.2+ optionalDependencies:+ '@emotion/is-prop-valid': 0.8.8+ dev: false+resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}engines: {node: '>= 0.6'}@@ -16538,42 +16490,6 @@ packages:- ts-nodedev: true- resolution: {integrity: sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==}- engines: {node: '>=14'}- hasBin: true- peerDependencies:- '@swc/core': ^1- postcss: ^8.4.12- typescript: ^4.1.0- peerDependenciesMeta:- '@swc/core':- optional: true- postcss:- optional: true- typescript:- optional: true- dependencies:- bundle-require: 3.1.2([email protected])- cac: 6.7.14- chokidar: 3.5.3- debug: 4.3.4- esbuild: 0.14.54- execa: 5.1.1- globby: 11.1.0- joycon: 3.1.1- postcss-load-config: 3.1.4([email protected])- resolve-from: 5.0.0- rollup: 2.79.1- source-map: 0.8.0-beta.0- sucrase: 3.34.0- tree-kill: 1.2.2- typescript: 5.1.6- transitivePeerDependencies:- - supports-color- - ts-node- dev: true-resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}engines: {node: '>= 6'}