The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
small bug fixes
Steven Teyc18a0436c9ff
diff --git a/components/app/modals/add-edit-link-modal/index.tsx b/components/app/modals/add-edit-link-modal/index.tsxindex 7aaf11976c..b9525a10fd 100644--- a/components/app/modals/add-edit-link-modal/index.tsx+++ b/components/app/modals/add-edit-link-modal/index.tsx@@ -223,11 +223,11 @@ function AddEditLinkModal({setShowModal={setShowAddEditLinkModal}closeWithX={homepageDemo ? false : true}>- <div className="grid max-h-[min(906px,_90vh)] w-full divide-x divide-gray-100 overflow-scroll bg-white shadow-xl transition-all scrollbar-hide sm:max-w-screen-lg sm:grid-cols-2 sm:rounded-2xl sm:border sm:border-gray-200">+ <div className="relative grid max-h-[min(906px,_90vh)] w-full divide-x divide-gray-100 overflow-scroll bg-white shadow-xl transition-all scrollbar-hide sm:max-w-screen-lg sm:grid-cols-2 sm:rounded-2xl sm:border sm:border-gray-200">{!hideXButton && !homepageDemo && (<buttononClick={() => setShowAddEditLinkModal(false)}- className="group absolute top-0 right-0 m-3 hidden rounded-full p-2 text-gray-500 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:bg-gray-200 sm:block"+ className="group absolute top-0 right-0 z-20 m-3 hidden rounded-full p-2 text-gray-500 transition-all duration-75 hover:bg-gray-100 focus:outline-none active:bg-gray-200 sm:block"><X className="h-5 w-5" /></button>diff --git a/components/layout/home/index.tsx b/components/layout/home/index.tsxindex 40d1aa65f0..cc4f1537d4 100644--- a/components/layout/home/index.tsx+++ b/components/layout/home/index.tsx@@ -10,11 +10,9 @@ import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";export default function HomeLayout({children,- domain,meta = <Meta />,}: {children: ReactNode;- domain?: string;meta?: ReactNode;}) {const { data: session, status } = useSession();@@ -27,27 +25,15 @@ export default function HomeLayout({<div className="mx-auto max-w-screen-xl px-5 md:px-20"><div className="flex h-16 items-center justify-between"><div className="flex items-center">- {domain ? (- <a href="https://dub.sh" target="_blank" rel="noreferrer">- <Image- src="/_static/logotype.svg"- alt="Dub.sh logo"- width={834}- height={236}- className="w-24"- />- </a>- ) : (- <Link href="/">- <Image- src="/_static/logotype.svg"- alt="Dub.sh logo"- width={834}- height={236}- className="w-24"- />- </Link>- )}+ <Link href="/">+ <Image+ src="/_static/logotype.svg"+ alt="Dub.sh logo"+ width={834}+ height={236}+ className="w-24"+ />+ </Link></div><AnimatePresence>@@ -78,17 +64,10 @@ export default function HomeLayout({<span className="sr-only">Twitter</span><Twitter className="h-6 w-6 text-gray-600" /></a>- {domain ? (- <a href="https://dub.sh" target="_blank" rel="noreferrer">- <span className="sr-only">Dub.sh Logo</span>- <Logo className="h-7 w-7 text-gray-600" />- </a>- ) : (- <Link href="/">- <span className="sr-only">Dub.sh Logo</span>- <Logo className="h-7 w-7 text-gray-600" />- </Link>- )}+ <Link href="/">+ <span className="sr-only">Dub.sh Logo</span>+ <Logo className="h-7 w-7 text-gray-600" />+ </Link><ahref="https://github.com/steven-tey/dub"target="_blank"diff --git a/lib/middleware/root.ts b/lib/middleware/root.tsindex ee028dafe2..d86c2fcb1e 100644--- a/lib/middleware/root.ts+++ b/lib/middleware/root.ts@@ -30,7 +30,7 @@ export default async function RootMiddleware(}} else {// rewrite to a /placeholder page unless the user defines a site to redirect to- return NextResponse.rewrite(new URL(`/placeholder/${domain}`, req.url));+ return NextResponse.rewrite("https://dub.sh");}}}diff --git a/pages/placeholder/[[...domain]].tsx b/pages/placeholder/[[...domain]].tsxindex 8ebeae2902..e11b03f59e 100644--- a/pages/placeholder/[[...domain]].tsx+++ b/pages/placeholder/[[...domain]].tsx@@ -3,9 +3,9 @@ import { ParsedUrlQuery } from "querystring";import Globe from "@/components/home/globe";import HomeLayout from "@/components/layout/home";-export default function Placeholder({ domain }: { domain: string }) {+export default function Placeholder() {return (- <HomeLayout domain={domain}>+ <HomeLayout><Globe /></HomeLayout>);@@ -15,12 +15,8 @@ interface Params extends ParsedUrlQuery {}export const getStaticPaths = async () => {- const paths = [- { params: { domain: [] } },- { params: { domain: ["stey.me"] } },- ];return {- paths,+ paths: [],fallback: "blocking",};};@@ -29,7 +25,7 @@ export const getStaticProps: GetStaticProps = async (context) => {const { domain } = context.params as Params;return {props: {- domain: domain ? domain[0] : "dub.sh",+ domain,},};};