The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update icons
Steven Tey056ce55d28b6
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/default-domains.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/default-domains.tsxnew file mode 100644index 0000000000..a845b7aa57--- /dev/null+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/default-domains.tsx@@ -0,0 +1,84 @@+"use client";++import useDefaultDomains from "@/lib/swr/use-default-domains";+import useWorkspace from "@/lib/swr/use-workspace";+import { DomainCardTitleColumn } from "@/ui/domains/domain-card-title-column";+import { Logo, Switch } from "@dub/ui";+import { Amazon, ChatGPT, GitHubEnhanced, Spotify } from "@dub/ui/src/icons";+import { DUB_DOMAINS } from "@dub/utils";+import { useEffect, useState } from "react";+import { toast } from "sonner";++function DubDomainsIcon(domain: string) {+ switch (domain) {+ case "chatg.pt":+ return ChatGPT;+ case "git.new":+ return GitHubEnhanced;+ case "spti.fi":+ return Spotify;+ case "amzn.id":+ return Amazon;+ default:+ return Logo;+ }+}++export function DefaultDomains() {+ const { id } = useWorkspace();+ const { defaultDomains: initialDefaultDomains, mutate } = useDefaultDomains();+ const [defaultDomains, setDefaultDomains] = useState<string[]>([]);+ useEffect(() => {+ if (initialDefaultDomains) {+ setDefaultDomains(initialDefaultDomains);+ }+ }, [initialDefaultDomains]);+ const [submitting, setSubmitting] = useState(false);++ return (+ <div className="mt-2 grid grid-cols-1 gap-3">+ {DUB_DOMAINS.map(({ slug, description }) => (+ <div+ key={slug}+ className="flex items-center justify-between rounded-xl border border-gray-200 bg-white p-5"+ >+ <DomainCardTitleColumn+ domain={slug}+ icon={DubDomainsIcon(slug)}+ description={description}+ defaultDomain+ />+ <Switch+ disabled={submitting}+ checked={defaultDomains?.includes(slug)}+ fn={() => {+ const oldDefaultDomains = defaultDomains.slice();+ const newDefaultDomains = defaultDomains.includes(slug)+ ? defaultDomains.filter((d) => d !== slug)+ : [...defaultDomains, slug];++ setDefaultDomains(newDefaultDomains);+ setSubmitting(true);+ fetch(`/api/domains/default?workspaceId=${id}`, {+ method: "PUT",+ body: JSON.stringify({+ defaultDomains: newDefaultDomains.filter((d) => d !== null),+ }),+ })+ .then(async (res) => {+ if (res.ok) {+ await mutate();+ } else {+ const error = await res.text();+ toast.error(error);+ setDefaultDomains(oldDefaultDomains);+ }+ })+ .finally(() => setSubmitting(false));+ }}+ />+ </div>+ ))}+ </div>+ );+}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsxindex 8674ba09cd..de7c00c019 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx@@ -1,26 +1,27 @@"use client";-import useDefaultDomains from "@/lib/swr/use-default-domains";import useDomains from "@/lib/swr/use-domains";import useWorkspace from "@/lib/swr/use-workspace";import DomainCard from "@/ui/domains/domain-card";import DomainCardPlaceholder from "@/ui/domains/domain-card-placeholder";-import { DomainCardTitleColumn } from "@/ui/domains/domain-card-title-column";import { useAddEditDomainModal } from "@/ui/modals/add-edit-domain-modal";import EmptyState from "@/ui/shared/empty-state";-import { Globe, Switch, useRouterStuff } from "@dub/ui";-import { DUB_DOMAINS, cn } from "@dub/utils";+import { Globe, useRouterStuff } from "@dub/ui";+import { ToggleGroup } from "@dub/ui/src/toggle-group";import Link from "next/link";-import { useEffect, useState } from "react";-import { toast } from "sonner";+import { DefaultDomains } from "./default-domains";export default function WorkspaceDomainsClient() {const { id: workspaceId } = useWorkspace();- const { AddEditDomainModal, AddDomainButton } = useAddEditDomainModal();+ const { AddEditDomainModal, AddDomainButton } = useAddEditDomainModal({+ buttonProps: {+ className: "h-9 rounded-lg",+ },+ });const { searchParams, queryParams } = useRouterStuff();- const tab = searchParams.get("tab") === "archived" ? "archived" : "active";+ const tab = searchParams.get("tab") || "active";const { allWorkspaceDomains, loading } = useDomains({archived: tab === "archived" ? true : false,});@@ -44,9 +45,13 @@ export default function WorkspaceDomainsClient() {</p></div><div className="flex items-center gap-3">- <DomainTabs+ <ToggleGroup+ options={[+ { value: "active", label: "Active" },+ { value: "archived", label: "Archived" },+ ]}selected={tab}- onSelect={(id) => queryParams({ set: { tab: id } })}+ selectAction={(id) => queryParams({ set: { tab: id } })}/><AddDomainButton /></div>@@ -76,7 +81,13 @@ export default function WorkspaceDomainsClient() {</div>)) : (- <DomainCardPlaceholder />+ <ul className="grid grid-cols-1 gap-3">+ {Array.from({ length: 6 }).map((_, idx) => (+ <li key={idx}>+ <DomainCardPlaceholder />+ </li>+ ))}+ </ul>)}</div><div className="mt-10">@@ -99,101 +110,3 @@ export default function WorkspaceDomainsClient() {</>);}--function DefaultDomains() {- const { id } = useWorkspace();- const { defaultDomains: initialDefaultDomains, mutate } = useDefaultDomains();- const [defaultDomains, setDefaultDomains] = useState<string[]>([]);- useEffect(() => {- if (initialDefaultDomains) {- setDefaultDomains(initialDefaultDomains);- }- }, [initialDefaultDomains]);- const [submitting, setSubmitting] = useState(false);-- return (- <div className="mt-2 grid grid-cols-1 gap-3">- {DUB_DOMAINS.map(({ slug, description }) => (- <div- key={slug}- className="flex items-center justify-between rounded-xl border border-gray-200 bg-white p-5"- >- <DomainCardTitleColumn- domain={slug}- description={description}- defaultDomain- />- <Switch- disabled={submitting}- checked={defaultDomains?.includes(slug)}- fn={() => {- const oldDefaultDomains = defaultDomains.slice();- const newDefaultDomains = defaultDomains.includes(slug)- ? defaultDomains.filter((d) => d !== slug)- : [...defaultDomains, slug];-- setDefaultDomains(newDefaultDomains);- setSubmitting(true);- fetch(`/api/domains/default?workspaceId=${id}`, {- method: "PUT",- body: JSON.stringify({- defaultDomains: newDefaultDomains.filter((d) => d !== null),- }),- })- .then(async (res) => {- if (res.ok) {- await mutate();- } else {- const error = await res.text();- toast.error(error);- setDefaultDomains(oldDefaultDomains);- }- })- .finally(() => setSubmitting(false));- }}- />- </div>- ))}- </div>- );-}--const domainTabOptions = [- { id: "active", label: "Active" },- { id: "archived", label: "Archived" },-];-export function DomainTabs({- selected,- onSelect,-}: {- selected: string | null;- onSelect?: (id: string) => void;-}) {- return (- <div className="flex text-sm">- {domainTabOptions.map(({ id, label }, idx) => (- <div key={id} className="relative">- <button- type="button"- onClick={() => onSelect?.(id)}- className={cn(- "border border-gray-200 px-5 py-[9px] transition-colors duration-75",- id === selected- ? "border-gray-300 bg-gray-100 text-black"- : [- "text-gray-600 hover:bg-gray-50 hover:text-gray-800",- idx > 0 && "border-l-transparent",- idx < domainTabOptions.length - 1 && "border-r-transparent",- ],- idx === 0 && "rounded-l-md",- idx === domainTabOptions.length - 1 && "rounded-r-md",- )}- aria-selected={id === selected}- >- {label}- </button>- </div>- ))}- </div>- );-}diff --git a/apps/web/lib/swr/use-domains.ts b/apps/web/lib/swr/use-domains.tsindex ff4eb19d7d..3475c421dc 100644--- a/apps/web/lib/swr/use-domains.ts+++ b/apps/web/lib/swr/use-domains.ts@@ -40,7 +40,6 @@ export default function useDomains({const allWorkspaceDomains = data || [];const activeWorkspaceDomains = data?.filter((domain) => !domain.archived);- const archivedWorkspaceDomains = data?.filter((domain) => domain.archived);const activeDefaultDomains =(workspaceDefaultDomains &&@@ -70,7 +69,6 @@ export default function useDomains({return {activeWorkspaceDomains, // active workspace domains- archivedWorkspaceDomains, // archived workspace domainsactiveDefaultDomains, // active default Dub domainsallWorkspaceDomains, // all workspace domains (active + archived)allActiveDomains, // all active domains (active workspace domains + active default Dub domains)diff --git a/apps/web/ui/domains/domain-card-placeholder.tsx b/apps/web/ui/domains/domain-card-placeholder.tsxindex 5bd9bc0524..2bf8b6e809 100644--- a/apps/web/ui/domains/domain-card-placeholder.tsx+++ b/apps/web/ui/domains/domain-card-placeholder.tsx@@ -2,14 +2,14 @@ export default function DomainCardPlaceholder() {return (<div className="grid grid-cols-[60%_1fr] items-center gap-4 rounded-xl border border-gray-200 bg-white p-5 sm:grid-cols-[2fr_1fr_1.5fr] md:grid-cols-[2fr_1fr_0.5fr_1.5fr]"><div className="flex items-center gap-2">- <div className="h-12 w-12 animate-pulse rounded-md bg-gray-200" />+ <div className="h-12 w-12 animate-pulse rounded-full bg-gray-200" /><div><div className="h-6 w-32 animate-pulse rounded-md bg-gray-200" />- <div className="mt-1 h-5 w-32 animate-pulse rounded-md bg-gray-200" />+ <div className="mt-2 h-4 w-48 animate-pulse rounded-md bg-gray-200" /></div></div>- <div className="h-6 w-32 animate-pulse rounded-md bg-gray-200" />- <div className="h-6 w-32 animate-pulse rounded-md bg-gray-200" />+ <div className="h-6 w-24 animate-pulse rounded-md bg-gray-200" />+ <div className="h-6 w-24 animate-pulse rounded-md bg-gray-200" /></div>);}diff --git a/apps/web/ui/domains/domain-card-title-column.tsx b/apps/web/ui/domains/domain-card-title-column.tsxindex a41860e8d6..f98b18ee32 100644--- a/apps/web/ui/domains/domain-card-title-column.tsx+++ b/apps/web/ui/domains/domain-card-title-column.tsx@@ -3,12 +3,14 @@ import { punycode } from "@dub/utils";export function DomainCardTitleColumn({domain,+ icon: Icon = Globe,url,description,primary = false,defaultDomain = false,}: {domain: string;+ icon?: React.ElementType;url?: string | null;description?: string;primary?: boolean;@@ -18,7 +20,7 @@ export function DomainCardTitleColumn({<div className="flex items-center gap-4"><div className="rounded-full border border-gray-200"><div className="rounded-full border border-white bg-gradient-to-t from-gray-100 p-1 md:p-3">- <Globe className="h-5 w-5" />+ <Icon className="h-5 w-5" /></div></div><div className="overflow-hidden">diff --git a/apps/web/ui/domains/domain-card.tsx b/apps/web/ui/domains/domain-card.tsxindex 026d25865f..8b62198c2e 100644--- a/apps/web/ui/domains/domain-card.tsx+++ b/apps/web/ui/domains/domain-card.tsx@@ -22,7 +22,7 @@ import {useIntersectionObserver,useMediaQuery,} from "@dub/ui";-import { CursorRays } from "@dub/ui/src/icons";+import { CursorRays, Globe } from "@dub/ui/src/icons";import { DEFAULT_LINK_PROPS, cn, fetcher, nFormatter } from "@dub/utils";import { motion } from "framer-motion";import {@@ -33,6 +33,7 @@ import {QrCode,} from "lucide-react";import Link from "next/link";+import { useSearchParams } from "next/navigation";import { useRef, useState } from "react";import { toast } from "sonner";import useSWR from "swr";@@ -90,6 +91,9 @@ export default function DomainCard({ props }: { props: DomainProps }) {data &&!["Valid Configuration", "Pending Verification"].includes(data.status);+ const searchParams = useSearchParams();+ const tab = searchParams.get("tab") || "active";+return (<><div@@ -101,6 +105,7 @@ export default function DomainCard({ props }: { props: DomainProps }) {<div className="grid grid-cols-[60%_1fr] items-center gap-4 sm:grid-cols-[2fr_1fr_1.5fr] md:grid-cols-[2fr_1fr_0.5fr_1.5fr]"><DomainCardTitleColumndomain={domain}+ icon={tab === "active" ? Globe : Archive}url={linkProps?.url}primary={primary}/>diff --git a/packages/ui/src/icons/default-domains/amazon.tsx b/packages/ui/src/icons/default-domains/amazon.tsxnew file mode 100644index 0000000000..17a0c365cb--- /dev/null+++ b/packages/ui/src/icons/default-domains/amazon.tsx@@ -0,0 +1,45 @@+import { cn } from "@dub/utils";++export function Amazon({ className }: { className?: string }) {+ return (+ <svg+ className={cn("h-full w-full", className)}+ viewBox="0 0 222 222"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <circle cx="111" cy="111" r="111" fill="url(#paint0_linear_39_35)" />+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M167.627 151.288C165.868 148.976 155.967 150.187 151.538 150.74C150.176 150.91 149.967 149.698 151.198 148.825C159.073 143.144 172.023 144.772 173.515 146.687C175.032 148.602 173.137 161.895 165.718 168.236C164.584 169.22 163.503 168.692 164.012 167.402C165.66 163.141 169.406 153.595 167.627 151.288ZM161.889 158.017C148.087 168.43 128.096 174 110.873 174C86.7384 174 65.0031 164.852 48.5549 149.615C47.2658 148.423 48.424 146.794 49.9749 147.72C67.7121 158.308 89.6704 164.668 112.331 164.668C127.607 164.668 144.438 161.43 159.888 154.686C162.233 153.683 164.186 156.257 161.894 158.002M120.018 102.131C120.018 108.758 120.187 114.27 116.989 120.141C114.415 124.911 110.325 127.849 105.765 127.849C99.5374 127.849 95.9221 122.889 95.9221 115.559C95.9221 101.093 108.304 98.4611 120.022 98.4611L120.022 102.136M136.379 143.493C135.317 144.496 133.766 144.574 132.555 143.91C127.18 139.231 126.211 137.055 123.24 132.585C114.343 142.092 108.057 144.932 96.5085 144.932C82.8614 144.932 72.2288 136.129 72.2288 118.497C72.2288 104.729 79.3673 95.3391 89.5105 90.753C98.2967 86.7002 110.601 85.9828 120.008 84.863L120.008 82.6669C120.008 78.6335 120.313 73.8632 118.06 70.3776C116.073 67.2508 112.288 65.9661 108.954 65.9661C102.765 65.9661 97.2548 69.2819 95.9124 76.1562C95.6265 77.6881 94.57 79.1861 93.0919 79.2637L77.361 77.5039C76.0379 77.1839 74.5792 76.0641 74.9379 73.9456C78.5725 54.0258 95.8009 48 111.207 48C119.102 48 129.419 50.1961 135.632 56.4449C143.527 64.153 142.771 74.4352 142.771 85.6289L142.771 112.064C142.771 120.019 145.911 123.5 148.887 127.8C149.929 129.318 150.156 131.169 148.848 132.309C145.533 135.227 139.65 140.564 136.412 143.575L136.354 143.517"+ fill="url(#paint1_radial_39_35)"+ />+ <defs>+ <linearGradient+ id="paint0_linear_39_35"+ x1="0"+ y1="0"+ x2="222"+ y2="222"+ gradientUnits="userSpaceOnUse"+ >+ <stop stopColor="#FF9900" />+ <stop offset="0.5" stopColor="#FF9900" />+ <stop offset="1" stopColor="#EA580C" />+ </linearGradient>+ <radialGradient+ id="paint1_radial_39_35"+ cx="0"+ cy="0"+ r="1"+ gradientUnits="userSpaceOnUse"+ gradientTransform="translate(48 48) rotate(45) scale(178.191 178.229)"+ >+ <stop stopColor="white" />+ <stop offset="1" stopColor="white" stopOpacity="0.5" />+ </radialGradient>+ </defs>+ </svg>+ );+}diff --git a/packages/ui/src/icons/default-domains/chatgpt.tsx b/packages/ui/src/icons/default-domains/chatgpt.tsxnew file mode 100644index 0000000000..da73c38247--- /dev/null+++ b/packages/ui/src/icons/default-domains/chatgpt.tsx@@ -0,0 +1,31 @@+import { cn } from "@dub/utils";++export function ChatGPT({ className }: { className?: string }) {+ return (+ <svg+ className={cn("h-full w-full", className)}+ viewBox="0 0 222 222"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <circle cx="111" cy="111" r="111" fill="black" />+ <path+ d="M173.607 97.7454C176.886 87.8002 175.751 76.9142 170.492 67.8719C162.584 54.0098 146.691 46.8792 131.17 50.2298C122.423 40.4311 109.151 36.0738 96.3504 38.7981C83.5497 41.5224 73.1632 50.9148 69.1005 63.4398C58.9049 65.5455 50.1051 71.9745 44.9529 81.0819C36.9593 94.9215 38.7736 112.379 49.4395 124.252C46.1479 134.192 47.2727 145.08 52.5258 154.125C60.4432 167.992 76.3466 175.122 91.8764 171.767C98.784 179.601 108.708 184.058 119.11 183.999C135.02 184.014 149.114 173.67 153.974 158.414C164.168 156.304 172.967 149.876 178.122 140.771C186.019 126.956 184.197 109.593 173.607 97.7454ZM119.11 174.444C112.76 174.454 106.609 172.213 101.735 168.112L102.593 167.623L131.456 150.844C132.917 149.981 133.818 148.406 133.827 146.7V105.717L146.03 112.826C146.152 112.889 146.237 113.006 146.258 113.143V147.103C146.227 162.19 134.091 174.412 119.11 174.444ZM60.756 149.348C57.5714 143.81 56.428 137.318 57.5268 131.015L58.3841 131.533L87.2755 148.312C88.7311 149.172 90.535 149.172 91.9907 148.312L127.283 127.82V142.009C127.277 142.158 127.203 142.296 127.083 142.383L97.849 159.363C84.8581 166.9 68.2607 162.419 60.756 149.348ZM53.1545 86.032C56.3612 80.4583 61.4227 76.207 67.443 74.0308V108.567C67.4209 110.266 68.3188 111.843 69.7863 112.682L104.907 133.087L92.7051 140.196C92.5711 140.267 92.4105 140.267 92.2764 140.196L63.0993 123.244C50.134 115.676 45.6875 98.9734 53.1545 85.8881V86.032ZM153.403 109.488L118.167 88.8812L130.341 81.8013C130.475 81.7297 130.636 81.7297 130.77 81.8013L159.947 98.7815C169.053 104.074 174.307 114.185 173.432 124.737C172.557 135.289 165.712 144.383 155.86 148.082V113.546C155.809 111.851 154.875 110.309 153.403 109.488ZM165.548 91.0973L164.691 90.5792L135.856 73.6566C134.392 72.7912 132.577 72.7912 131.113 73.6566L95.8486 94.1479V79.9594C95.8333 79.8125 95.8991 79.6689 96.02 79.5853L125.197 62.6339C134.326 57.3376 145.672 57.8319 154.312 63.9022C162.953 69.9726 167.331 80.5253 165.548 90.9821V91.0973ZM89.1901 116.251L76.9877 109.171C76.8644 109.096 76.7807 108.969 76.7591 108.826V74.9517C76.773 64.3439 82.8721 54.6994 92.4112 50.201C101.95 45.7026 113.211 47.1605 121.311 53.9424L120.453 54.4316L91.5906 71.2103C90.1293 72.0736 89.2279 73.6485 89.2187 75.3546L89.1901 116.251ZM95.82 101.861L111.537 92.7377L127.283 101.861V120.107L111.595 129.231L95.8486 120.107L95.82 101.861Z"+ fill="url(#paint0_radial_39_26)"+ />+ <defs>+ <radialGradient+ id="paint0_radial_39_26"+ cx="0"+ cy="0"+ r="1"+ gradientUnits="userSpaceOnUse"+ gradientTransform="translate(40 38) rotate(45.5947) scale(204.365 204.365)"+ >+ <stop stopColor="white" stopOpacity="0.85" />+ <stop offset="1" stopColor="white" stopOpacity="0.1" />+ </radialGradient>+ </defs>+ </svg>+ );+}diff --git a/packages/ui/src/icons/default-domains/github.tsx b/packages/ui/src/icons/default-domains/github.tsxnew file mode 100644index 0000000000..34b751da12--- /dev/null+++ b/packages/ui/src/icons/default-domains/github.tsx@@ -0,0 +1,31 @@+import { cn } from "@dub/utils";++export function GitHubEnhanced({ className }: { className?: string }) {+ return (+ <svg+ className={cn("h-full w-full", className)}+ viewBox="0 0 222 222"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <circle cx="111" cy="111" r="111" fill="#0D1117" />+ <path+ d="M111.001 44C72.8976 44 42 74.7556 42 112.696C42 143.048 61.7708 168.798 89.1868 177.882C92.6352 178.518 93.9013 176.392 93.9013 174.577C93.9013 172.939 93.8373 167.528 93.8076 161.787C74.6115 165.943 70.5609 153.682 70.5609 153.682C67.4222 145.742 62.8997 143.63 62.8997 143.63C56.6393 139.367 63.3716 139.454 63.3716 139.454C70.3004 139.939 73.9488 146.534 73.9488 146.534C80.103 157.036 90.0906 154 94.0281 152.244C94.6474 147.804 96.4356 144.774 98.4089 143.058C83.0829 141.321 66.972 135.431 66.972 109.108C66.972 101.608 69.6674 95.4801 74.0814 90.6693C73.3649 88.939 71.0031 81.952 74.7498 72.4896C74.7498 72.4896 80.544 70.6433 93.7299 79.5312C99.2339 78.0091 105.137 77.2458 111.001 77.2196C116.864 77.2458 122.772 78.0091 128.286 79.5312C141.456 70.6433 147.242 72.4896 147.242 72.4896C150.998 81.952 148.635 88.939 147.919 90.6693C152.343 95.4801 155.02 101.608 155.02 109.108C155.02 135.493 138.878 141.303 123.513 143.004C125.988 145.136 128.194 149.316 128.194 155.725C128.194 164.917 128.114 172.315 128.114 174.577C128.114 176.405 129.356 178.547 132.853 177.873C160.254 168.779 180 143.038 180 112.696C180 74.7556 149.107 44 111.001 44ZM67.843 141.859C67.691 142.201 67.1517 142.303 66.6603 142.069C66.1599 141.844 65.8788 141.379 66.041 141.037C66.1896 140.685 66.73 140.587 67.2294 140.823C67.731 141.047 68.0166 141.517 67.843 141.859ZM71.237 144.874C70.9079 145.178 70.2646 145.037 69.8282 144.557C69.3768 144.078 69.2923 143.438 69.6259 143.129C69.9653 142.826 70.5892 142.968 71.0416 143.447C71.493 143.931 71.5809 144.567 71.237 144.874ZM73.5655 148.732C73.1427 149.024 72.4514 148.75 72.0241 148.139C71.6013 147.529 71.6013 146.796 72.0332 146.502C72.4617 146.209 73.1427 146.473 73.5758 147.079C73.9974 147.7 73.9974 148.433 73.5655 148.732ZM77.5034 153.2C77.1252 153.615 76.3196 153.504 75.73 152.937C75.1267 152.383 74.9588 151.597 75.3381 151.182C75.7209 150.766 76.531 150.883 77.1252 151.445C77.7239 151.998 77.9067 152.789 77.5034 153.2ZM82.5928 154.708C82.4259 155.246 81.6501 155.491 80.8685 155.262C80.0881 155.027 79.5774 154.397 79.7351 153.853C79.8973 153.311 80.6766 153.056 81.4639 153.301C82.2431 153.535 82.755 154.161 82.5928 154.708ZM88.3847 155.348C88.4041 155.915 87.7414 156.384 86.921 156.395C86.096 156.413 85.4287 155.954 85.4196 155.397C85.4196 154.825 86.0674 154.359 86.8924 154.346C87.7128 154.33 88.3847 154.785 88.3847 155.348ZM94.0746 155.131C94.1729 155.684 93.6027 156.251 92.788 156.403C91.987 156.548 91.2455 156.207 91.1438 155.659C91.0444 155.092 91.6248 154.525 92.4247 154.378C93.2405 154.237 93.9706 154.569 94.0746 155.131Z"+ fill="url(#paint0_radial_39_32)"+ />+ <defs>+ <radialGradient+ id="paint0_radial_39_32"+ cx="0"+ cy="0"+ r="1"+ gradientUnits="userSpaceOnUse"+ gradientTransform="translate(42 44) rotate(44.1575) scale(192.354 192.312)"+ >+ <stop stopColor="white" stopOpacity="0.77" />+ <stop offset="1" stopColor="white" stopOpacity="0.1" />+ </radialGradient>+ </defs>+ </svg>+ );+}diff --git a/packages/ui/src/icons/default-domains/spotify.tsx b/packages/ui/src/icons/default-domains/spotify.tsxnew file mode 100644index 0000000000..4687471da8--- /dev/null+++ b/packages/ui/src/icons/default-domains/spotify.tsx@@ -0,0 +1,21 @@+import { cn } from "@dub/utils";++export function Spotify({ className }: { className?: string }) {+ return (+ <svg+ className={cn("h-full w-full", className)}+ viewBox="0 0 222 222"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M110.999 0C49.6974 0 0 49.6973 0 111.001C0 172.307 49.6974 222 110.999 222C172.308 222 222 172.307 222 111.001C222 49.7012 172.308 0.00530203 110.998 0.00530203L110.999 0ZM161.903 160.095C159.915 163.356 155.647 164.389 152.386 162.388C126.324 146.469 93.5163 142.863 54.8787 151.691C51.1554 152.539 47.4441 150.207 46.5958 146.482C45.7435 142.757 48.0671 139.046 51.7996 138.197C94.0823 128.537 130.351 132.697 159.61 150.578C162.871 152.579 163.904 156.834 161.903 160.095ZM175.489 129.871C172.984 133.943 167.655 135.228 163.586 132.723C133.75 114.383 88.2687 109.072 52.9779 119.785C48.4011 121.167 43.5671 118.588 42.178 114.019C40.7995 109.442 43.3802 104.617 47.9491 103.225C88.2608 90.9935 138.376 96.9185 172.639 117.974C176.708 120.479 177.994 125.808 175.489 129.872V129.871ZM176.655 98.3977C140.881 77.1485 81.8574 75.1947 47.7012 85.5615C42.2164 87.225 36.4161 84.1286 34.754 78.6437C33.0918 73.1561 36.1855 67.3596 41.6743 65.6922C80.8832 53.7891 146.063 56.0889 187.251 80.5405C192.195 83.4685 193.812 89.8403 190.883 94.7672C187.967 99.7007 181.578 101.327 176.661 98.3977H176.655Z"+ fill="#1ED760"+ />+ <path+ d="M161.903 160.095C159.915 163.356 155.647 164.389 152.386 162.388C126.325 146.469 93.5164 142.863 54.8788 151.691C51.1556 152.539 47.4442 150.207 46.5959 146.482C45.7436 142.757 48.0672 139.046 51.7997 138.197C94.0824 128.537 130.351 132.697 159.61 150.578C162.871 152.579 163.905 156.834 161.903 160.095ZM175.489 129.871C172.984 133.943 167.656 135.228 163.586 132.723C133.75 114.383 88.2689 109.072 52.9781 119.785C48.4012 121.167 43.5672 118.588 42.1781 114.019C40.7996 109.442 43.3803 104.617 47.9492 103.225C88.2609 90.9934 138.376 96.9184 172.639 117.974C176.709 120.479 177.994 125.808 175.489 129.872V129.871ZM176.656 98.3977C140.881 77.1485 81.8576 75.1947 47.7014 85.5615C42.2165 87.225 36.4163 84.1286 34.7541 78.6437C33.092 73.1561 36.1856 67.3596 41.6744 65.6921C80.8833 53.7891 146.064 56.0888 187.251 80.5405C192.195 83.4685 193.813 89.8402 190.883 94.7672C187.967 99.7007 181.578 101.327 176.661 98.3977H176.656Z"+ fill="white"+ />+ </svg>+ );+}diff --git a/packages/ui/src/icons/facebook.tsx b/packages/ui/src/icons/facebook.tsxindex 9162cfc8c7..7e23d1bf84 100644--- a/packages/ui/src/icons/facebook.tsx+++ b/packages/ui/src/icons/facebook.tsx@@ -1,4 +1,4 @@-export default function Facebook({+export function Facebook({className,fill = "#1977f3",}: {diff --git a/packages/ui/src/icons/github.tsx b/packages/ui/src/icons/github.tsxindex ff13f3937a..a47c3aee7c 100644--- a/packages/ui/src/icons/github.tsx+++ b/packages/ui/src/icons/github.tsx@@ -1,4 +1,4 @@-export default function Github({ className }: { className?: string }) {+export function Github({ className }: { className?: string }) {return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/ui/src/icons/google.tsx b/packages/ui/src/icons/google.tsxindex 8bc4e31a33..9141635e49 100644--- a/packages/ui/src/icons/google.tsx+++ b/packages/ui/src/icons/google.tsx@@ -1,4 +1,4 @@-export default function Google({ className }: { className?: string }) {+export function Google({ className }: { className?: string }) {return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/ui/src/icons/index.tsx b/packages/ui/src/icons/index.tsxindex f6efd4ac76..92e7706919 100644--- a/packages/ui/src/icons/index.tsx+++ b/packages/ui/src/icons/index.tsx@@ -11,26 +11,32 @@ export { default as Success } from "./success";export { default as Tick } from "./tick";// loaders-export { default as LoadingCircle } from "./loading-circle";-export { default as LoadingDots } from "./loading-dots";-export { default as LoadingSpinner } from "./loading-spinner";+export * from "./loading-circle";+export * from "./loading-dots";+export * from "./loading-spinner";// brand logos-export { default as Facebook } from "./facebook";-export { default as Github } from "./github";+export * from "./facebook";+export * from "./github";export * from "./go";-export { default as Google } from "./google";-export { default as LinkedIn } from "./linkedin";+export * from "./google";+export * from "./linkedin";export * from "./prisma";-export { default as ProductHunt } from "./product-hunt";+export * from "./product-hunt";export * from "./python";export * from "./raycast";export * from "./ruby";export * from "./tinybird";-export { default as Twitter } from "./twitter";+export * from "./twitter";export * from "./typescript";-export { default as Unsplash } from "./unsplash";-export { default as YouTube } from "./youtube";+export * from "./unsplash";+export * from "./youtube";++// dub default domains logos+export * from "./default-domains/amazon";+export * from "./default-domains/chatgpt";+export * from "./default-domains/github";+export * from "./default-domains/spotify";// Nucleo iconsexport * from "./nucleo";diff --git a/packages/ui/src/icons/linkedin.tsx b/packages/ui/src/icons/linkedin.tsxindex c68f80d239..c37383f42b 100644--- a/packages/ui/src/icons/linkedin.tsx+++ b/packages/ui/src/icons/linkedin.tsx@@ -1,6 +1,6 @@import { cn } from "@dub/utils";-export default function LinkedIn({ className }: { className?: string }) {+export function LinkedIn({ className }: { className?: string }) {return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/ui/src/icons/loading-circle.tsx b/packages/ui/src/icons/loading-circle.tsxindex ec645e7120..46af372015 100644--- a/packages/ui/src/icons/loading-circle.tsx+++ b/packages/ui/src/icons/loading-circle.tsx@@ -1,6 +1,6 @@import { cn } from "@dub/utils";-export default function LoadingCircle({ className }: { className?: string }) {+export function LoadingCircle({ className }: { className?: string }) {return (<svgaria-hidden="true"diff --git a/packages/ui/src/icons/loading-dots.tsx b/packages/ui/src/icons/loading-dots.tsxindex d0b7cc44e4..3cd700a695 100644--- a/packages/ui/src/icons/loading-dots.tsx+++ b/packages/ui/src/icons/loading-dots.tsx@@ -1,4 +1,4 @@-export default function LoadingDots() {+export function LoadingDots() {return (<span className="inline-flex items-center">{[...Array(3)].map((_, i) => (diff --git a/packages/ui/src/icons/loading-spinner.tsx b/packages/ui/src/icons/loading-spinner.tsxindex 22aa7ca0aa..d3d369ed92 100644--- a/packages/ui/src/icons/loading-spinner.tsx+++ b/packages/ui/src/icons/loading-spinner.tsx@@ -1,6 +1,6 @@import { cn } from "@dub/utils";-export default function LoadingSpinner({ className }: { className?: string }) {+export function LoadingSpinner({ className }: { className?: string }) {return (<div className={cn("h-5 w-5", className)}><divdiff --git a/packages/ui/src/icons/product-hunt.tsx b/packages/ui/src/icons/product-hunt.tsxindex 731523d16f..db941b3630 100644--- a/packages/ui/src/icons/product-hunt.tsx+++ b/packages/ui/src/icons/product-hunt.tsx@@ -1,4 +1,4 @@-export default function ProductHunt({ className }: { className?: string }) {+export function ProductHunt({ className }: { className?: string }) {return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/ui/src/icons/twitter.tsx b/packages/ui/src/icons/twitter.tsxindex 65567ac0b7..5c76819935 100644--- a/packages/ui/src/icons/twitter.tsx+++ b/packages/ui/src/icons/twitter.tsx@@ -1,6 +1,6 @@import { cn } from "@dub/utils";-export default function Twitter({ className }: { className?: string }) {+export function Twitter({ className }: { className?: string }) {return (<svgwidth="300"diff --git a/packages/ui/src/icons/unsplash.tsx b/packages/ui/src/icons/unsplash.tsxindex ad04fc87d3..205c87f443 100644--- a/packages/ui/src/icons/unsplash.tsx+++ b/packages/ui/src/icons/unsplash.tsx@@ -1,4 +1,4 @@-export default function Unsplash({ className }: { className?: string }) {+export function Unsplash({ className }: { className?: string }) {return (<svgwidth="32"diff --git a/packages/ui/src/icons/youtube.tsx b/packages/ui/src/icons/youtube.tsxindex a59efd1cad..db1ca01479 100644--- a/packages/ui/src/icons/youtube.tsx+++ b/packages/ui/src/icons/youtube.tsx@@ -1,6 +1,6 @@import { cn } from "@dub/utils";-export default function YouTube({ className }: { className?: string }) {+export function YouTube({ className }: { className?: string }) {return (<svgxmlns="http://www.w3.org/2000/svg"diff --git a/packages/ui/src/nav/content/resources-content.tsx b/packages/ui/src/nav/content/resources-content.tsxindex 5091012d99..f7bb98f0e0 100644--- a/packages/ui/src/nav/content/resources-content.tsx+++ b/packages/ui/src/nav/content/resources-content.tsx@@ -1,5 +1,6 @@import { cn } from "@dub/utils";import { RESOURCES } from "../../content";+import { Amazon, ChatGPT, GitHubEnhanced, Spotify } from "../../icons";import { ContentProps, createHref } from "../shared";import {ContentLinkCard,@@ -16,135 +17,22 @@ export function ResourcesContent({ domain }: ContentProps) {<ToolLinkCardname="Spotify Link Shortener"href={createHref("/tools/spotify-link-shortener", domain)}- icon={- <svg- className="h-full w-full"- viewBox="0 0 222 222"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M110.999 0C49.6974 0 0 49.6973 0 111.001C0 172.307 49.6974 222 110.999 222C172.308 222 222 172.307 222 111.001C222 49.7012 172.308 0.00530203 110.998 0.00530203L110.999 0ZM161.903 160.095C159.915 163.356 155.647 164.389 152.386 162.388C126.324 146.469 93.5163 142.863 54.8787 151.691C51.1554 152.539 47.4441 150.207 46.5958 146.482C45.7435 142.757 48.0671 139.046 51.7996 138.197C94.0823 128.537 130.351 132.697 159.61 150.578C162.871 152.579 163.904 156.834 161.903 160.095ZM175.489 129.871C172.984 133.943 167.655 135.228 163.586 132.723C133.75 114.383 88.2687 109.072 52.9779 119.785C48.4011 121.167 43.5671 118.588 42.178 114.019C40.7995 109.442 43.3802 104.617 47.9491 103.225C88.2608 90.9935 138.376 96.9185 172.639 117.974C176.708 120.479 177.994 125.808 175.489 129.872V129.871ZM176.655 98.3977C140.881 77.1485 81.8574 75.1947 47.7012 85.5615C42.2164 87.225 36.4161 84.1286 34.754 78.6437C33.0918 73.1561 36.1855 67.3596 41.6743 65.6922C80.8832 53.7891 146.063 56.0889 187.251 80.5405C192.195 83.4685 193.812 89.8403 190.883 94.7672C187.967 99.7007 181.578 101.327 176.661 98.3977H176.655Z"- fill="#1ED760"- />- <path- d="M161.903 160.095C159.915 163.356 155.647 164.389 152.386 162.388C126.325 146.469 93.5164 142.863 54.8788 151.691C51.1556 152.539 47.4442 150.207 46.5959 146.482C45.7436 142.757 48.0672 139.046 51.7997 138.197C94.0824 128.537 130.351 132.697 159.61 150.578C162.871 152.579 163.905 156.834 161.903 160.095ZM175.489 129.871C172.984 133.943 167.656 135.228 163.586 132.723C133.75 114.383 88.2689 109.072 52.9781 119.785C48.4012 121.167 43.5672 118.588 42.1781 114.019C40.7996 109.442 43.3803 104.617 47.9492 103.225C88.2609 90.9934 138.376 96.9184 172.639 117.974C176.709 120.479 177.994 125.808 175.489 129.872V129.871ZM176.656 98.3977C140.881 77.1485 81.8576 75.1947 47.7014 85.5615C42.2165 87.225 36.4163 84.1286 34.7541 78.6437C33.092 73.1561 36.1856 67.3596 41.6744 65.6921C80.8833 53.7891 146.064 56.0888 187.251 80.5405C192.195 83.4685 193.813 89.8402 190.883 94.7672C187.967 99.7007 181.578 101.327 176.661 98.3977H176.656Z"- fill="white"- />- </svg>- }+ icon={<Spotify />}/><ToolLinkCardname="ChatGPT Link Shortener"href={createHref("/tools/chatgpt-link-shortener", domain)}- icon={- <svg- className="h-full w-full"- viewBox="0 0 222 222"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <circle cx="111" cy="111" r="111" fill="black" />- <path- d="M173.607 97.7454C176.886 87.8002 175.751 76.9142 170.492 67.8719C162.584 54.0098 146.691 46.8792 131.17 50.2298C122.423 40.4311 109.151 36.0738 96.3504 38.7981C83.5497 41.5224 73.1632 50.9148 69.1005 63.4398C58.9049 65.5455 50.1051 71.9745 44.9529 81.0819C36.9593 94.9215 38.7736 112.379 49.4395 124.252C46.1479 134.192 47.2727 145.08 52.5258 154.125C60.4432 167.992 76.3466 175.122 91.8764 171.767C98.784 179.601 108.708 184.058 119.11 183.999C135.02 184.014 149.114 173.67 153.974 158.414C164.168 156.304 172.967 149.876 178.122 140.771C186.019 126.956 184.197 109.593 173.607 97.7454ZM119.11 174.444C112.76 174.454 106.609 172.213 101.735 168.112L102.593 167.623L131.456 150.844C132.917 149.981 133.818 148.406 133.827 146.7V105.717L146.03 112.826C146.152 112.889 146.237 113.006 146.258 113.143V147.103C146.227 162.19 134.091 174.412 119.11 174.444ZM60.756 149.348C57.5714 143.81 56.428 137.318 57.5268 131.015L58.3841 131.533L87.2755 148.312C88.7311 149.172 90.535 149.172 91.9907 148.312L127.283 127.82V142.009C127.277 142.158 127.203 142.296 127.083 142.383L97.849 159.363C84.8581 166.9 68.2607 162.419 60.756 149.348ZM53.1545 86.032C56.3612 80.4583 61.4227 76.207 67.443 74.0308V108.567C67.4209 110.266 68.3188 111.843 69.7863 112.682L104.907 133.087L92.7051 140.196C92.5711 140.267 92.4105 140.267 92.2764 140.196L63.0993 123.244C50.134 115.676 45.6875 98.9734 53.1545 85.8881V86.032ZM153.403 109.488L118.167 88.8812L130.341 81.8013C130.475 81.7297 130.636 81.7297 130.77 81.8013L159.947 98.7815C169.053 104.074 174.307 114.185 173.432 124.737C172.557 135.289 165.712 144.383 155.86 148.082V113.546C155.809 111.851 154.875 110.309 153.403 109.488ZM165.548 91.0973L164.691 90.5792L135.856 73.6566C134.392 72.7912 132.577 72.7912 131.113 73.6566L95.8486 94.1479V79.9594C95.8333 79.8125 95.8991 79.6689 96.02 79.5853L125.197 62.6339C134.326 57.3376 145.672 57.8319 154.312 63.9022C162.953 69.9726 167.331 80.5253 165.548 90.9821V91.0973ZM89.1901 116.251L76.9877 109.171C76.8644 109.096 76.7807 108.969 76.7591 108.826V74.9517C76.773 64.3439 82.8721 54.6994 92.4112 50.201C101.95 45.7026 113.211 47.1605 121.311 53.9424L120.453 54.4316L91.5906 71.2103C90.1293 72.0736 89.2279 73.6485 89.2187 75.3546L89.1901 116.251ZM95.82 101.861L111.537 92.7377L127.283 101.861V120.107L111.595 129.231L95.8486 120.107L95.82 101.861Z"- fill="url(#paint0_radial_39_26)"- />- <defs>- <radialGradient- id="paint0_radial_39_26"- cx="0"- cy="0"- r="1"- gradientUnits="userSpaceOnUse"- gradientTransform="translate(40 38) rotate(45.5947) scale(204.365 204.365)"- >- <stop stopColor="white" stopOpacity="0.85" />- <stop offset="1" stopColor="white" stopOpacity="0.1" />- </radialGradient>- </defs>- </svg>- }+ icon={<ChatGPT />}/><ToolLinkCardname="GitHub Link Shortener"href={createHref("/tools/github-link-shortener", domain)}- icon={- <svg- className="h-full w-full"- viewBox="0 0 222 222"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <circle cx="111" cy="111" r="111" fill="#0D1117" />- <path- d="M111.001 44C72.8976 44 42 74.7556 42 112.696C42 143.048 61.7708 168.798 89.1868 177.882C92.6352 178.518 93.9013 176.392 93.9013 174.577C93.9013 172.939 93.8373 167.528 93.8076 161.787C74.6115 165.943 70.5609 153.682 70.5609 153.682C67.4222 145.742 62.8997 143.63 62.8997 143.63C56.6393 139.367 63.3716 139.454 63.3716 139.454C70.3004 139.939 73.9488 146.534 73.9488 146.534C80.103 157.036 90.0906 154 94.0281 152.244C94.6474 147.804 96.4356 144.774 98.4089 143.058C83.0829 141.321 66.972 135.431 66.972 109.108C66.972 101.608 69.6674 95.4801 74.0814 90.6693C73.3649 88.939 71.0031 81.952 74.7498 72.4896C74.7498 72.4896 80.544 70.6433 93.7299 79.5312C99.2339 78.0091 105.137 77.2458 111.001 77.2196C116.864 77.2458 122.772 78.0091 128.286 79.5312C141.456 70.6433 147.242 72.4896 147.242 72.4896C150.998 81.952 148.635 88.939 147.919 90.6693C152.343 95.4801 155.02 101.608 155.02 109.108C155.02 135.493 138.878 141.303 123.513 143.004C125.988 145.136 128.194 149.316 128.194 155.725C128.194 164.917 128.114 172.315 128.114 174.577C128.114 176.405 129.356 178.547 132.853 177.873C160.254 168.779 180 143.038 180 112.696C180 74.7556 149.107 44 111.001 44ZM67.843 141.859C67.691 142.201 67.1517 142.303 66.6603 142.069C66.1599 141.844 65.8788 141.379 66.041 141.037C66.1896 140.685 66.73 140.587 67.2294 140.823C67.731 141.047 68.0166 141.517 67.843 141.859ZM71.237 144.874C70.9079 145.178 70.2646 145.037 69.8282 144.557C69.3768 144.078 69.2923 143.438 69.6259 143.129C69.9653 142.826 70.5892 142.968 71.0416 143.447C71.493 143.931 71.5809 144.567 71.237 144.874ZM73.5655 148.732C73.1427 149.024 72.4514 148.75 72.0241 148.139C71.6013 147.529 71.6013 146.796 72.0332 146.502C72.4617 146.209 73.1427 146.473 73.5758 147.079C73.9974 147.7 73.9974 148.433 73.5655 148.732ZM77.5034 153.2C77.1252 153.615 76.3196 153.504 75.73 152.937C75.1267 152.383 74.9588 151.597 75.3381 151.182C75.7209 150.766 76.531 150.883 77.1252 151.445C77.7239 151.998 77.9067 152.789 77.5034 153.2ZM82.5928 154.708C82.4259 155.246 81.6501 155.491 80.8685 155.262C80.0881 155.027 79.5774 154.397 79.7351 153.853C79.8973 153.311 80.6766 153.056 81.4639 153.301C82.2431 153.535 82.755 154.161 82.5928 154.708ZM88.3847 155.348C88.4041 155.915 87.7414 156.384 86.921 156.395C86.096 156.413 85.4287 155.954 85.4196 155.397C85.4196 154.825 86.0674 154.359 86.8924 154.346C87.7128 154.33 88.3847 154.785 88.3847 155.348ZM94.0746 155.131C94.1729 155.684 93.6027 156.251 92.788 156.403C91.987 156.548 91.2455 156.207 91.1438 155.659C91.0444 155.092 91.6248 154.525 92.4247 154.378C93.2405 154.237 93.9706 154.569 94.0746 155.131Z"- fill="url(#paint0_radial_39_32)"- />- <defs>- <radialGradient- id="paint0_radial_39_32"- cx="0"- cy="0"- r="1"- gradientUnits="userSpaceOnUse"- gradientTransform="translate(42 44) rotate(44.1575) scale(192.354 192.312)"- >- <stop stopColor="white" stopOpacity="0.77" />- <stop offset="1" stopColor="white" stopOpacity="0.1" />- </radialGradient>- </defs>- </svg>- }+ icon={<GitHubEnhanced />}/><ToolLinkCardname="Amazon Link Shortener"href={createHref("/tools/amazon-link-shortener", domain)}- icon={- <svg- className="h-full w-full"- viewBox="0 0 222 222"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <circle- cx="111"- cy="111"- r="111"- fill="url(#paint0_linear_39_35)"- />- <path- fillRule="evenodd"- clipRule="evenodd"- d="M167.627 151.288C165.868 148.976 155.967 150.187 151.538 150.74C150.176 150.91 149.967 149.698 151.198 148.825C159.073 143.144 172.023 144.772 173.515 146.687C175.032 148.602 173.137 161.895 165.718 168.236C164.584 169.22 163.503 168.692 164.012 167.402C165.66 163.141 169.406 153.595 167.627 151.288ZM161.889 158.017C148.087 168.43 128.096 174 110.873 174C86.7384 174 65.0031 164.852 48.5549 149.615C47.2658 148.423 48.424 146.794 49.9749 147.72C67.7121 158.308 89.6704 164.668 112.331 164.668C127.607 164.668 144.438 161.43 159.888 154.686C162.233 153.683 164.186 156.257 161.894 158.002M120.018 102.131C120.018 108.758 120.187 114.27 116.989 120.141C114.415 124.911 110.325 127.849 105.765 127.849C99.5374 127.849 95.9221 122.889 95.9221 115.559C95.9221 101.093 108.304 98.4611 120.022 98.4611L120.022 102.136M136.379 143.493C135.317 144.496 133.766 144.574 132.555 143.91C127.18 139.231 126.211 137.055 123.24 132.585C114.343 142.092 108.057 144.932 96.5085 144.932C82.8614 144.932 72.2288 136.129 72.2288 118.497C72.2288 104.729 79.3673 95.3391 89.5105 90.753C98.2967 86.7002 110.601 85.9828 120.008 84.863L120.008 82.6669C120.008 78.6335 120.313 73.8632 118.06 70.3776C116.073 67.2508 112.288 65.9661 108.954 65.9661C102.765 65.9661 97.2548 69.2819 95.9124 76.1562C95.6265 77.6881 94.57 79.1861 93.0919 79.2637L77.361 77.5039C76.0379 77.1839 74.5792 76.0641 74.9379 73.9456C78.5725 54.0258 95.8009 48 111.207 48C119.102 48 129.419 50.1961 135.632 56.4449C143.527 64.153 142.771 74.4352 142.771 85.6289L142.771 112.064C142.771 120.019 145.911 123.5 148.887 127.8C149.929 129.318 150.156 131.169 148.848 132.309C145.533 135.227 139.65 140.564 136.412 143.575L136.354 143.517"- fill="url(#paint1_radial_39_35)"- />- <defs>- <linearGradient- id="paint0_linear_39_35"- x1="0"- y1="0"- x2="222"- y2="222"- gradientUnits="userSpaceOnUse"- >- <stop stopColor="#FF9900" />- <stop offset="0.5" stopColor="#FF9900" />- <stop offset="1" stopColor="#EA580C" />- </linearGradient>- <radialGradient- id="paint1_radial_39_35"- cx="0"- cy="0"- r="1"- gradientUnits="userSpaceOnUse"- gradientTransform="translate(48 48) rotate(45) scale(178.191 178.229)"- >- <stop stopColor="white" />- <stop offset="1" stopColor="white" stopOpacity="0.5" />- </radialGradient>- </defs>- </svg>- }+ icon={<Amazon />}/></div></div>diff --git a/packages/ui/src/toggle-group.tsx b/packages/ui/src/toggle-group.tsxindex ba0f33cc56..3a84fba058 100644--- a/packages/ui/src/toggle-group.tsx+++ b/packages/ui/src/toggle-group.tsx@@ -36,7 +36,7 @@ export function ToggleGroup({<p>{option.label}</p>{option.value === selected && (<motion.div- layoutId={options.join("-")}+ layoutId={layoutGroupId}className="absolute left-0 top-0 h-full w-full rounded-lg border border-gray-200 bg-gray-50"style={{ zIndex: -1 }}transition={{ duration: 0.25 }}diff --git a/packages/utils/src/constants/dub-domains.ts b/packages/utils/src/constants/dub-domains.tsnew file mode 100644index 0000000000..bf88bcf238--- /dev/null+++ b/packages/utils/src/constants/dub-domains.ts@@ -0,0 +1,143 @@+import { DUB_WORKSPACE_ID, SHORT_DOMAIN } from "./main";++export const DUB_DOMAINS = [+ {+ id: "clce1z7ch00j0rbstbjufva4j",+ slug: SHORT_DOMAIN,+ verified: true,+ primary: true,+ archived: false,+ publicStats: false,+ target: `https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ type: "redirect",+ placeholder: "https://dub.co/help/article/what-is-dub",+ clicks: 0,+ allowedHostnames: [],+ description: "The default domain for all new accounts.",+ projectId: DUB_WORKSPACE_ID,+ },+ ...(process.env.NEXT_PUBLIC_IS_DUB+ ? [+ {+ id: "clce1z7cs00y8rbstk4xtnj0k",+ slug: "chatg.pt",+ verified: true,+ primary: false,+ archived: false,+ publicStats: false,+ target: "https://dub.co/tools/chatgpt-link-shortener",+ type: "redirect",+ placeholder: "https://chat.openai.com/g/g-UGjKKONEe-domainsgpt",+ clicks: 0,+ allowedHostnames: ["chat.openai.com", "chatgpt.com"],+ description:+ "Branded domain for ChatGPT links (convos, custom GPTs).",+ projectId: DUB_WORKSPACE_ID,+ },+ {+ id: "cloxw8y2u0003js08a7mqg1j8",+ slug: "spti.fi",+ verified: true,+ primary: false,+ archived: false,+ publicStats: false,+ target: "https://dub.co/tools/spotify-link-shortener",+ type: "redirect",+ placeholder: "https://open.spotify.com/album/1SCyi9a5pOasikidToUY5y",+ clicks: 0,+ allowedHostnames: ["open.spotify.com"],+ description:+ "Branded domain for Spotify links (songs, playlists, etc.).",+ projectId: DUB_WORKSPACE_ID,+ },+ {+ id: "cltgtd6s5000341itdszz20u2",+ slug: "git.new",+ verified: true,+ primary: false,+ archived: false,+ publicStats: false,+ target: "https://dub.co/tools/github-link-shortener",+ type: "redirect",+ placeholder: "https://github.com/dubinc/dub",+ clicks: 0,+ allowedHostnames: ["github.com", "gist.github.com"],+ description:+ "Branded domain for GitHub links (repositories, gists, etc.).",+ projectId: DUB_WORKSPACE_ID,+ },+ {+ id: "cloxw8qtk000bjt08n9b812vs",+ slug: "amzn.id",+ verified: true,+ primary: false,+ archived: false,+ publicStats: false,+ target: "https://dub.co/tools/amazon-link-shortener",+ type: "redirect",+ placeholder: "https://www.amazon.com/dp/B0BW4SWNC8",+ clicks: 0,+ allowedHostnames: [+ "amazon.com",+ "amazon.co.uk",+ "amazon.ca",+ "amazon.es",+ "amazon.fr",+ ],+ description:+ "Branded domain for Amazon links (products, wishlists, etc.).",+ projectId: DUB_WORKSPACE_ID,+ },+ {+ id: "clugy7euh000a11h6ignmj42o",+ slug: "loooooooo.ng",+ verified: true,+ primary: false,+ archived: true,+ publicStats: true,+ target: "https://dub.co/tools/url-lengthener",+ type: "redirect",+ placeholder: "https://d.to/long",+ clicks: 0,+ description:+ "Branded domain for lengthening links instead of shortening them.",+ projectId: DUB_WORKSPACE_ID,+ },+ ]+ : []),+];++export const DUB_DOMAINS_ARRAY = DUB_DOMAINS.map((domain) => domain.slug);++export const DUB_DEMO_LINKS = [+ {+ id: "clqo10sum0006js08vutzfxt3",+ domain: "d.to",+ key: "try",+ },+ {+ id: "cltshzzpd0005126z3rd2lvo4",+ domain: "dub.sh",+ key: "try",+ },+ {+ id: "clot0z5rg000djp08ue98hxkn",+ domain: "chatg.pt",+ key: "domains",+ },+ {+ id: "clp4jh9av0001l308ormavtlu",+ domain: "spti.fi",+ key: "hans",+ },+ {+ id: "cltgtsex40003ck8z444hum5u",+ domain: "git.new",+ key: "dub",+ },+ {+ id: "clp3k3yoi0001ju0874nz899q",+ domain: "amzn.id",+ key: "tv",+ },+];diff --git a/packages/utils/src/constants/index.ts b/packages/utils/src/constants/index.tsindex c6cae32907..7c52a9daf3 100644--- a/packages/utils/src/constants/index.ts+++ b/packages/utils/src/constants/index.ts@@ -1,207 +1,12 @@export * from "./cctlds";export * from "./countries";export * from "./domains";+export * from "./dub-domains";export * from "./framer-motion";export * from "./layout";export * from "./localhost";+export * from "./main";export * from "./middleware";export * from "./misc";export * from "./pricing";export * from "./saml";--export const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME || "Dub.co";--export const SHORT_DOMAIN =- process.env.NEXT_PUBLIC_APP_SHORT_DOMAIN || "dub.sh";--export const HOME_DOMAIN = `https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`;--export const APP_HOSTNAMES = new Set([- `app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- `preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- "localhost:8888",- "localhost",-]);--export const APP_DOMAIN =- process.env.NEXT_PUBLIC_VERCEL_ENV === "production"- ? `https://app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"- ? `https://preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : "http://localhost:8888";--export const APP_DOMAIN_WITH_NGROK =- process.env.NEXT_PUBLIC_VERCEL_ENV === "production"- ? `https://app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"- ? `https://preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : process.env.NEXT_PUBLIC_NGROK_URL || "http://localhost:8888";--export const API_HOSTNAMES = new Set([- `api.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- `api-staging.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- `api.${SHORT_DOMAIN}`,- "api.localhost:8888",-]);--export const API_DOMAIN =- process.env.NEXT_PUBLIC_VERCEL_ENV === "production"- ? `https://api.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"- ? `https://api-staging.${process.env.NEXT_PUBLIC_APP_DOMAIN}`- : "http://api.localhost:8888";--export const ADMIN_HOSTNAMES = new Set([- `admin.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- "admin.localhost:8888",-]);--export const DUB_LOGO = "https://assets.dub.co/logo.png";-export const DUB_WORDMARK = "https://assets.dub.co/wordmark.png";-export const DUB_THUMBNAIL = "https://assets.dub.co/thumbnail.jpg";--export const DUB_WORKSPACE_ID = "cl7pj5kq4006835rbjlt2ofka";-export const LEGAL_WORKSPACE_ID = "clrflia0j0000vs7sqfhz9c7q";-export const LEGAL_USER_ID = "clqei1lgc0000vsnzi01pbf47";--export const DUB_DOMAINS = [- {- id: "clce1z7ch00j0rbstbjufva4j",- slug: SHORT_DOMAIN,- verified: true,- primary: true,- archived: false,- publicStats: false,- target: `https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`,- type: "redirect",- placeholder: "https://dub.co/help/article/what-is-dub",- clicks: 0,- allowedHostnames: [],- description: "The default domain for all new accounts.",- projectId: DUB_WORKSPACE_ID,- },- ...(process.env.NEXT_PUBLIC_IS_DUB- ? [- {- id: "clce1z7cs00y8rbstk4xtnj0k",- slug: "chatg.pt",- verified: true,- primary: false,- archived: false,- publicStats: false,- target: "https://dub.co/tools/chatgpt-link-shortener",- type: "redirect",- placeholder: "https://chat.openai.com/g/g-UGjKKONEe-domainsgpt",- clicks: 0,- allowedHostnames: ["chat.openai.com", "chatgpt.com"],- description:- "Branded domain for ChatGPT links (convos, custom GPTs).",- projectId: DUB_WORKSPACE_ID,- },- {- id: "cloxw8y2u0003js08a7mqg1j8",- slug: "spti.fi",- verified: true,- primary: false,- archived: false,- publicStats: false,- target: "https://dub.co/tools/spotify-link-shortener",- type: "redirect",- placeholder: "https://open.spotify.com/album/1SCyi9a5pOasikidToUY5y",- clicks: 0,- allowedHostnames: ["open.spotify.com"],- description:- "Branded domain for Spotify links (songs, playlists, etc.).",- projectId: DUB_WORKSPACE_ID,- },- {- id: "cltgtd6s5000341itdszz20u2",- slug: "git.new",- verified: true,- primary: false,- archived: false,- publicStats: false,- target: "https://dub.co/tools/github-link-shortener",- type: "redirect",- placeholder: "https://github.com/dubinc/dub",- clicks: 0,- allowedHostnames: ["github.com", "gist.github.com"],- description:- "Branded domain for GitHub links (repositories, gists, etc.).",- projectId: DUB_WORKSPACE_ID,- },- {- id: "cloxw8qtk000bjt08n9b812vs",- slug: "amzn.id",- verified: true,- primary: false,- archived: false,- publicStats: false,- target: "https://dub.co/tools/amazon-link-shortener",- type: "redirect",- placeholder: "https://www.amazon.com/dp/B0BW4SWNC8",- clicks: 0,- allowedHostnames: [- "amazon.com",- "amazon.co.uk",- "amazon.ca",- "amazon.es",- "amazon.fr",- ],- description:- "Branded domain for Amazon links (products, wishlists, etc.).",- projectId: DUB_WORKSPACE_ID,- },- {- id: "clugy7euh000a11h6ignmj42o",- slug: "loooooooo.ng",- verified: true,- primary: false,- archived: true,- publicStats: true,- target: "https://dub.co/tools/url-lengthener",- type: "redirect",- placeholder: "https://d.to/long",- clicks: 0,- description:- "Branded domain for lengthening links instead of shortening them.",- projectId: DUB_WORKSPACE_ID,- },- ]- : []),-];--export const DUB_DOMAINS_ARRAY = DUB_DOMAINS.map((domain) => domain.slug);--export const DUB_DEMO_LINKS = [- {- id: "clqo10sum0006js08vutzfxt3",- domain: "d.to",- key: "try",- },- {- id: "cltshzzpd0005126z3rd2lvo4",- domain: "dub.sh",- key: "try",- },- {- id: "clot0z5rg000djp08ue98hxkn",- domain: "chatg.pt",- key: "domains",- },- {- id: "clp4jh9av0001l308ormavtlu",- domain: "spti.fi",- key: "hans",- },- {- id: "cltgtsex40003ck8z444hum5u",- domain: "git.new",- key: "dub",- },- {- id: "clp3k3yoi0001ju0874nz899q",- domain: "amzn.id",- key: "tv",- },-];diff --git a/packages/utils/src/constants/main.ts b/packages/utils/src/constants/main.tsnew file mode 100644index 0000000000..c26b521b8f--- /dev/null+++ b/packages/utils/src/constants/main.ts@@ -0,0 +1,54 @@+export const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME || "Dub.co";++export const SHORT_DOMAIN =+ process.env.NEXT_PUBLIC_APP_SHORT_DOMAIN || "dub.sh";++export const HOME_DOMAIN = `https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`;++export const APP_HOSTNAMES = new Set([+ `app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ `preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ "localhost:8888",+ "localhost",+]);++export const APP_DOMAIN =+ process.env.NEXT_PUBLIC_VERCEL_ENV === "production"+ ? `https://app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"+ ? `https://preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : "http://localhost:8888";++export const APP_DOMAIN_WITH_NGROK =+ process.env.NEXT_PUBLIC_VERCEL_ENV === "production"+ ? `https://app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"+ ? `https://preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : process.env.NEXT_PUBLIC_NGROK_URL || "http://localhost:8888";++export const API_HOSTNAMES = new Set([+ `api.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ `api-staging.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ `api.${SHORT_DOMAIN}`,+ "api.localhost:8888",+]);++export const API_DOMAIN =+ process.env.NEXT_PUBLIC_VERCEL_ENV === "production"+ ? `https://api.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"+ ? `https://api-staging.${process.env.NEXT_PUBLIC_APP_DOMAIN}`+ : "http://api.localhost:8888";++export const ADMIN_HOSTNAMES = new Set([+ `admin.${process.env.NEXT_PUBLIC_APP_DOMAIN}`,+ "admin.localhost:8888",+]);++export const DUB_LOGO = "https://assets.dub.co/logo.png";+export const DUB_WORDMARK = "https://assets.dub.co/wordmark.png";+export const DUB_THUMBNAIL = "https://assets.dub.co/thumbnail.jpg";++export const DUB_WORKSPACE_ID = "cl7pj5kq4006835rbjlt2ofka";+export const LEGAL_WORKSPACE_ID = "clrflia0j0000vs7sqfhz9c7q";+export const LEGAL_USER_ID = "clqei1lgc0000vsnzi01pbf47";