Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Added link to rebrand on login page

Steven Tey4c23897791b5
diff --git a/app/app/(auth)/login/page.tsx b/app/app/(auth)/login/page.tsx
index a67053b3ca..2fddebcb3e 100644
--- a/app/app/(auth)/login/page.tsx
+++ b/app/app/(auth)/login/page.tsx
@@ -11,7 +11,14 @@ export const metadata = constructMetadata({
export default function LoginPage() {
return (
- <div className="z-10 mt-[calc(30vh)] h-fit w-full max-w-md overflow-hidden border border-gray-100 sm:rounded-2xl sm:shadow-xl">
+ <div className="relative z-10 mt-[calc(30vh)] h-fit w-full max-w-md overflow-hidden border border-gray-100 sm:rounded-2xl sm:shadow-xl">
+ <a
+ href={`${HOME_DOMAIN}/blog/rebrand`}
+ target="_blank"
+ className="absolute right-3 top-3 rounded-full border border-gray-300 px-4 py-1 text-xs font-medium shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.1)] backdrop-blur transition-all hover:border-gray-500 hover:bg-white/50"
+ >
+ We've rebranded!
+ </a>
<div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 bg-white px-4 py-6 pt-8 text-center sm:px-16">
<a href={HOME_DOMAIN}>
<Logo className="h-10 w-10" />
diff --git a/app/app/(auth)/register/page.tsx b/app/app/(auth)/register/page.tsx
index 352be05060..3d008fb7bb 100644
--- a/app/app/(auth)/register/page.tsx
+++ b/app/app/(auth)/register/page.tsx
@@ -11,7 +11,14 @@ export const metadata = constructMetadata({
export default function RegisterPage() {
return (
- <div className="z-10 mt-[calc(30vh)] h-fit w-full max-w-md overflow-hidden border border-gray-100 sm:rounded-2xl sm:shadow-xl">
+ <div className="relative z-10 mt-[calc(30vh)] h-fit w-full max-w-md overflow-hidden border border-gray-100 sm:rounded-2xl sm:shadow-xl">
+ <a
+ href={`${HOME_DOMAIN}/blog/rebrand`}
+ target="_blank"
+ className="absolute right-3 top-3 rounded-full border border-gray-300 px-4 py-1 text-xs font-medium shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.1)] backdrop-blur transition-all hover:border-gray-500 hover:bg-white/50"
+ >
+ We've rebranded!
+ </a>
<div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 bg-white px-4 py-6 pt-8 text-center sm:px-16">
<a href={HOME_DOMAIN}>
<Logo className="h-10 w-10" />
diff --git a/emails/rebrand-email.tsx b/emails/rebrand-email.tsx
new file mode 100644
index 0000000000..c8c63ed03b
--- /dev/null
+++ b/emails/rebrand-email.tsx
@@ -0,0 +1,148 @@
+import {
+ Body,
+ Link,
+ Container,
+ Head,
+ Heading,
+ Hr,
+ Html,
+ Img,
+ Preview,
+ Section,
+ Tailwind,
+ Text,
+} from "@react-email/components";
+import { DUB_LOGO, DUB_THUMBNAIL } from "../lib/constants";
+import Footer from "./components/footer";
+
+export default function RebrandEmail({
+ name = "Brendon Urie",
+ email = "[email protected]",
+}: {
+ name: string | null;
+ email: string;
+}) {
+ return (
+ <Html>
+ <Head />
+ <Preview>
+ Today, we're thrilled to announce our rebrand. Dub.sh is now Dub.co.
+ </Preview>
+ <Tailwind>
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
+ <Section className="mt-8">
+ <Img
+ src={DUB_LOGO}
+ width="40"
+ height="40"
+ alt="Dub"
+ className="mx-auto my-0"
+ />
+ </Section>
+ <Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
+ Dub​.sh is rebranding to Dub​.co
+ </Heading>
+ <Section className="my-8">
+ <Img src={DUB_THUMBNAIL} alt="Dub" className="max-w-[500px]" />
+ </Section>
+ <Text className="text-sm leading-6 text-black">
+ Hey{name ? ` ${name}` : " there"}!
+ </Text>
+ <Text className="text-sm leading-6 text-black">
+ My name is Steven, and I'm the founder of Dub. Today, I have some
+ exciting news to share with you.
+ </Text>
+ <Text className="text-sm font-bold leading-6 text-black">
+ Dub​.sh is rebranding to Dub​.co.
+ </Text>
+ <Text className="text-sm leading-6 text-black">
+ You can learn more about the rebrand and what's changing{" "}
+ <Link
+ href="https://dub.co/blog/rebrand"
+ className="font-medium text-blue-600 no-underline"
+ >
+ in this blog post
+ </Link>
+ .
+ </Text>
+ <Text className="text-sm leading-6 text-black">
+ Moving forward, we'll also be sending product update emails from{" "}
+ <strong>ship.dub​.co</strong> instead of{" "}
+ <strong>ship.dub​.sh</strong>. We'd appreciate it if you can add{" "}
+ <strong>ship.dub​.co</strong> to your email whitelist to ensure
+ you receive our emails.
+ </Text>
+ <Hr />
+ <Text className="text-sm leading-6 text-black">
+ Along with the rebrand, we've also been working on a multitude of
+ new features. In the last 30 days, we rolled out 9 major updates:
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆{" "}
+ <Link
+ href="https://dub.co/blog/migration-assistants"
+ className="font-bold text-blue-600 no-underline"
+ >
+ Migration Assistants
+ </Link>{" "}
+ for Bitly and Short​.io
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆{" "}
+ <Link
+ href="https://dub.co/help"
+ className="font-bold text-blue-600 no-underline"
+ >
+ Dub Help Center
+ </Link>{" "}
+ - a one-stop shop for all your Dub questions
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Geo Targeting</strong> - Redirect visitors based on
+ their location
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Link comments</strong> - Leave comments on your links
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Link Cloaking</strong> – Mask your destination URL
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Custom QR Codes</strong> – Available on the Pro plan
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Custom Social Media Cards</strong>
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Detailed Link Stats</strong>
+ </Text>
+ <Text className="ml-1 text-sm leading-6 text-black">
+ ◆ <strong>Link Pagination</strong>
+ </Text>
+ <Text className="text-sm leading-6 text-black">
+ Check out our{" "}
+ <Link
+ href="https://dub.co/changelog"
+ className="font-medium text-blue-600 no-underline"
+ >
+ changelog
+ </Link>{" "}
+ to see what's new on Dub.
+ </Text>
+
+ <Text className="text-sm leading-6 text-black">
+ Let me know if you have any questions or feedback. I'm always
+ happy to help!
+ </Text>
+ <Text className="text-sm font-light leading-6 text-gray-400">
+ Steven from Dub
+ </Text>
+
+ <Footer email={email} marketing />
+ </Container>
+ </Body>
+ </Tailwind>
+ </Html>
+ );
+}
diff --git a/lib/middleware/link.ts b/lib/middleware/link.ts
index cd5ef0f8f6..a45d48208e 100644
--- a/lib/middleware/link.ts
+++ b/lib/middleware/link.ts
@@ -30,7 +30,7 @@ export default async function LinkMiddleware(
}
const ip = ipAddress(req) || LOCALHOST_IP;
const { success } = await ratelimit(
- 5,
+ 10,
key === "github" ? "1 d" : "10 s",
).limit(`${ip}:${domain}:${key}`);
diff --git a/pages/api/edge/links/[key]/stats/[endpoint].ts b/pages/api/edge/links/[key]/stats/[endpoint].ts
index adc0389670..26160f87c2 100644
--- a/pages/api/edge/links/[key]/stats/[endpoint].ts
+++ b/pages/api/edge/links/[key]/stats/[endpoint].ts
@@ -27,8 +27,8 @@ export default async function handler(req: NextRequest) {
}
const ip = ipAddress(req) || LOCALHOST_IP;
const { success } = await ratelimit(
- 10,
- key === "github" && endpoint !== "clicks" ? "1 d" : "10 s",
+ 15,
+ key === "github" && endpoint !== "clicks" ? "1 h" : "10 s",
).limit(`${ip}:${domain}:${key}:${endpoint}`);
if (!success) {