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 pricing page, improved Accordion implementation

Steven Tey04ef10880068
diff --git a/app/[domain]/placeholder.tsx b/app/[domain]/placeholder.tsx
index a8f7dbf050..67bc64d663 100644
--- a/app/[domain]/placeholder.tsx
+++ b/app/[domain]/placeholder.tsx
@@ -1,6 +1,6 @@
"use client";
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import { useState } from "react";
import { motion } from "framer-motion";
import { useDebounce } from "use-debounce";
diff --git a/app/dub.sh/layout.tsx b/app/dub.sh/layout.tsx
index aac408bc51..8e68a5ee12 100644
--- a/app/dub.sh/layout.tsx
+++ b/app/dub.sh/layout.tsx
@@ -1,5 +1,6 @@
import Nav from "#/ui/home/nav";
import Footer from "#/ui/home/footer";
+import Background from "#/ui/home/background";
export default function MarketingLayout(props) {
return (
@@ -9,6 +10,7 @@ export default function MarketingLayout(props) {
<Nav />
{props.children}
<Footer />
+ <Background />
</div>
);
}
diff --git a/app/dub.sh/metatags/page.tsx b/app/dub.sh/metatags/page.tsx
index 3f72640d3a..671c9fde11 100644
--- a/app/dub.sh/metatags/page.tsx
+++ b/app/dub.sh/metatags/page.tsx
@@ -1,6 +1,6 @@
import { Github, Twitter } from "@/components/shared/icons";
import { Suspense } from "react";
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import LaunchTweet from "./launch";
import MetatagsContent from "./content";
import { constructMetadata } from "@/lib/utils";
diff --git a/app/dub.sh/page.tsx b/app/dub.sh/page.tsx
index ee9a177530..ad71293800 100644
--- a/app/dub.sh/page.tsx
+++ b/app/dub.sh/page.tsx
@@ -1,4 +1,4 @@
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import Demo from "#/ui/home/demo";
import Globe from "#/ui/home/globe";
import Stats from "#/ui/home/stats";
@@ -8,53 +8,25 @@ import Logos from "#/ui/home/logos";
import Pricing from "#/ui/home/pricing";
import OSS from "#/ui/home/oss";
import Testimonials from "#/ui/home/testimonials";
-import { Metadata } from "next";
+import { constructMetadata } from "@/lib/utils";
-const title = "Dub - Link Management for Modern Marketing Teams";
-const description =
- "Dub is an open-source link management tool for modern marketing teams to create, share, and track short links.";
-const image = "https://dub.sh/_static/thumbnail.png";
-
-export const metadata: Metadata = {
- title,
- description,
- openGraph: {
- title,
- description,
- images: [
- {
- url: image,
- },
- ],
- },
- twitter: {
- card: "summary_large_image",
- title,
- description,
- images: [image],
- creator: "@dubdotsh",
- },
-};
+export const metadata = constructMetadata({});
export default function Home() {
return (
<>
- <div className="z-10">
- <Hero />
- <Demo />
- <Logos />
- {/* @ts-expect-error Async Server Component */}
- <Globe />
- {/* @ts-expect-error Async Server Component */}
- <Stats />
- <Features />
- {/* @ts-expect-error Async Server Component */}
- <Testimonials />
- <Pricing homePage />
- {/* @ts-expect-error Async Server Component */}
- <OSS />
- </div>
- <Background />
+ <Hero />
+ <Demo />
+ <Logos />
+ {/* @ts-expect-error Async Server Component */}
+ <Globe />
+ {/* @ts-expect-error Async Server Component */}
+ <Stats />
+ <Features />
+ {/* @ts-expect-error Async Server Component */}
+ <Testimonials />
+ {/* @ts-expect-error Async Server Component */}
+ <OSS />
</>
);
}
diff --git a/app/dub.sh/pricing/page.tsx b/app/dub.sh/pricing/page.tsx
new file mode 100644
index 0000000000..422fdd4a18
--- /dev/null
+++ b/app/dub.sh/pricing/page.tsx
@@ -0,0 +1,18 @@
+import FAQ from "#/ui/home/faq";
+import Logos from "#/ui/home/logos";
+import Pricing from "#/ui/home/pricing";
+import { constructMetadata } from "@/lib/utils";
+
+export const metadata = constructMetadata({
+ title: "Pricing - Dub",
+});
+
+export default function PricingPage() {
+ return (
+ <>
+ <Pricing />
+ <Logos copy="Trusted & loved by marketing teams at world-class companies" />
+ <FAQ />
+ </>
+ );
+}
diff --git a/app/ui/accordion.tsx b/app/ui/accordion.tsx
index cf028f4dff..517914faaa 100644
--- a/app/ui/accordion.tsx
+++ b/app/ui/accordion.tsx
@@ -1,63 +1,60 @@
-"use client";
-
-import React, { ReactNode } from "react";
-import { styled, keyframes } from "@stitches/react";
-import { ChevronDown } from "lucide-react";
+import * as React from "react";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
+import { ChevronDown } from "lucide-react";
+import cn from "classnames";
-const slideDown = keyframes({
- from: { height: 0 },
- to: { height: "var(--radix-accordion-content-height)" },
-});
-
-const slideUp = keyframes({
- from: { height: "var(--radix-accordion-content-height)" },
- to: { height: 0 },
-});
+const Accordion = AccordionPrimitive.Root;
-const AccordionContent = styled(AccordionPrimitive.Content, {
- '&[data-state="open"]': {
- animation: `${slideDown} 300ms cubic-bezier(0.87, 0, 0.13, 1)`,
- },
- '&[data-state="closed"]': {
- animation: `${slideUp} 300ms cubic-bezier(0.87, 0, 0.13, 1)`,
- },
-});
+const AccordionItem = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Item>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
+>(({ className, ...props }, ref) => (
+ <AccordionPrimitive.Item
+ ref={ref}
+ className={cn(
+ "border-b border-b-slate-200 py-3 last:border-none",
+ className,
+ )}
+ {...props}
+ />
+));
+AccordionItem.displayName = "AccordionItem";
-// Your app...
-export default function Accordion({
- items,
- activeTab,
- setActiveTab,
-}: {
- items: { trigger: ReactNode; content: ReactNode }[];
- activeTab: number;
- setActiveTab: (index: number) => void;
-}) {
- return (
- <AccordionPrimitive.Root
- type="single"
- defaultValue={activeTab.toString()}
- onValueChange={(value) => setActiveTab(Number(value))}
+const AccordionTrigger = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Trigger>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Header className="flex">
+ <AccordionPrimitive.Trigger
+ ref={ref}
+ className={cn(
+ "flex flex-1 items-center justify-between font-medium transition-all sm:text-lg [&[data-state=open]>svg]:rotate-180",
+ className,
+ )}
+ {...props}
>
- {items.map(({ trigger, content }, index) => (
- <AccordionPrimitive.Item
- key={index}
- value={index.toString()}
- className="overflow-hidden border-b border-gray-200 py-3 last:border-none"
- >
- <AccordionPrimitive.Header>
- <AccordionPrimitive.Trigger className="group flex w-full items-center justify-between">
- {trigger}
- <ChevronDown
- aria-hidden
- className="h-5 w-5 text-gray-600 transition-transform duration-300 ease-[cubic-bezier(0.87,0,0.13,1)] group-radix-state-open:rotate-180"
- />
- </AccordionPrimitive.Trigger>
- </AccordionPrimitive.Header>
- <AccordionContent>{content}</AccordionContent>
- </AccordionPrimitive.Item>
- ))}
- </AccordionPrimitive.Root>
- );
-}
+ {children}
+ <ChevronDown className="h-5 w-5 transition-transform duration-300" />
+ </AccordionPrimitive.Trigger>
+ </AccordionPrimitive.Header>
+));
+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
+
+const AccordionContent = React.forwardRef<
+ React.ElementRef<typeof AccordionPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <AccordionPrimitive.Content
+ ref={ref}
+ className={cn(
+ "overflow-hidden text-sm text-gray-500 transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down sm:text-base",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ </AccordionPrimitive.Content>
+));
+AccordionContent.displayName = AccordionPrimitive.Content.displayName;
+
+export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
diff --git a/components/shared/background/background.module.css b/app/ui/home/background/background.module.css
similarity index 99%
rename from components/shared/background/background.module.css
rename to app/ui/home/background/background.module.css
index e9dfb9aa43..5a0b4077e4 100644
--- a/components/shared/background/background.module.css
+++ b/app/ui/home/background/background.module.css
@@ -7,6 +7,7 @@
width: 100vw;
min-height: 100vh;
position: fixed;
+ z-index: -1;
display: flex;
justify-content: center;
padding: 120px 24px 160px 24px;
diff --git a/app/ui/home/background/index.tsx b/app/ui/home/background/index.tsx
new file mode 100644
index 0000000000..2de8466bc7
--- /dev/null
+++ b/app/ui/home/background/index.tsx
@@ -0,0 +1,21 @@
+"use client";
+
+import { useSelectedLayoutSegment } from "next/navigation";
+import styles from "./background.module.css";
+
+const showBackgroundSegments = new Set(["metatags", "pricing"]);
+
+export default function Background() {
+ let segment;
+ try {
+ segment = useSelectedLayoutSegment();
+ } catch (e) {
+ // this is for /login and /signup which are still on /pages router
+ }
+
+ return !segment || showBackgroundSegments.has(segment) ? (
+ <div className={styles.main}>
+ <div className={styles.content} />
+ </div>
+ ) : null;
+}
diff --git a/app/ui/home/faq.tsx b/app/ui/home/faq.tsx
new file mode 100644
index 0000000000..57b00fdbbc
--- /dev/null
+++ b/app/ui/home/faq.tsx
@@ -0,0 +1,61 @@
+"use client";
+
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from "#/ui/accordion";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
+
+const faqs = [
+ {
+ question: "What happens when I exceed the click limit on my plan?",
+ answer:
+ "If you exceed your monthly click limits, your existing links will still work, but you need to upgrade to the Pro plan to view their stats or add more links.",
+ },
+ {
+ question: "Can I use the free plan for commercial purposes?",
+ answer: `Yes, absolutely! We want to make sure that everyone can use Dub for free, whether it's for personal or commercial use. However, we do have a fair use policy in place to prevent abuse. If you exceed the fair use policy, we may ask you to upgrade to the Pro plan.`,
+ },
+ {
+ question: "Can I cancel my subscription at any time?",
+ answer: `Yes, you can cancel your subscription at any time. If you cancel your subscription, you will still be able to use Dub until the end of your billing period. After that, you will be downgraded to the free plan.`,
+ },
+ {
+ question: "Do you offer refunds?",
+ answer: `We currently do not offer refunds. However, you can cancel your subscription at any time, after which you won't be charged again. We are constantly working on improving Dub, so this might change in the future.`,
+ },
+ {
+ question: "What if I need more than 500K clicks on the Enterprise plan?",
+ answer: `The 500K clicks is a soft limit on the Enterprise plan. If you anticipate needing more than 500K clicks, please reach out to support and we will work out a custom plan for you.`,
+ },
+];
+
+export default function FAQ() {
+ return (
+ <div className="mt-20 border-t border-gray-200 bg-white/10 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.2)] backdrop-blur">
+ <MaxWidthWrapper className="my-20">
+ <div className="grid grid-cols-1 gap-5 md:grid-cols-3">
+ <div className="p-3">
+ <h2 className="font-display text-2xl font-bold tracking-tight sm:text-3xl sm:tracking-wide md:text-4xl">
+ Pricing FAQs
+ </h2>
+ </div>
+ <Accordion type="single" className="col-span-2 px-3 sm:px-0">
+ {faqs.map((faq, idx) => (
+ <AccordionItem key={idx} value={idx.toString()}>
+ <AccordionTrigger className="py-2">
+ <h3 className="text-left text-lg">{faq.question}</h3>
+ </AccordionTrigger>
+ <AccordionContent>
+ <div className="py-4">{faq.answer}</div>
+ </AccordionContent>
+ </AccordionItem>
+ ))}
+ </Accordion>
+ </div>
+ </MaxWidthWrapper>
+ </div>
+ );
+}
diff --git a/app/ui/home/features.tsx b/app/ui/home/features.tsx
index 96c0bbbf8a..76394109e7 100644
--- a/app/ui/home/features.tsx
+++ b/app/ui/home/features.tsx
@@ -4,7 +4,12 @@ import Link from "next/link";
import { Airplay, Chart, QR, Users, Photo } from "@/components/shared/icons";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import { useState } from "react";
-import Accordion from "#/ui/accordion";
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from "#/ui/accordion";
import { AnimatePresence, motion } from "framer-motion";
import { useLinkQRModal } from "#/ui/modals/link-qr-modal";
import { DEFAULT_LINK_PROPS } from "@/lib/constants";
@@ -136,17 +141,23 @@ export default function Features() {
<div className="my-10 h-[840px] w-full overflow-hidden rounded-xl border border-gray-200 bg-white/10 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.2)] backdrop-blur lg:h-[630px]">
<div className="grid grid-cols-1 gap-10 p-5 lg:grid-cols-3">
<Accordion
- items={featureList.map(
- ({ key, title, icon, description, cta }) => ({
- trigger: (
+ type="single"
+ defaultValue="analytics"
+ onValueChange={(e) => {
+ setActiveFeature(featureList.findIndex(({ key }) => key === e));
+ }}
+ >
+ {featureList.map(({ key, title, icon, description, cta }) => (
+ <AccordionItem key={key} value={key}>
+ <AccordionTrigger>
<div className="flex items-center space-x-3 p-3">
{icon}
<h3 className="text-base font-semibold text-gray-600">
{title}
</h3>
</div>
- ),
- content: (
+ </AccordionTrigger>
+ <AccordionContent>
<div className="p-3">
<p className="mb-4 text-sm text-gray-500">
{description}
@@ -169,12 +180,10 @@ export default function Features() {
cta
)}
</div>
- ),
- }),
- )}
- activeTab={activeFeature}
- setActiveTab={setActiveFeature}
- />
+ </AccordionContent>
+ </AccordionItem>
+ ))}
+ </Accordion>
<div className="lg:col-span-2">
<AnimatePresence mode="wait">
{featureList.map((feature, index) => {
diff --git a/app/ui/home/footer.tsx b/app/ui/home/footer.tsx
index ae0e10f7ea..ad3d2f2263 100644
--- a/app/ui/home/footer.tsx
+++ b/app/ui/home/footer.tsx
@@ -6,8 +6,9 @@ import { useParams } from "next/navigation";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
const navigation = {
- tools: [{ name: "Metatags API", href: "/metatags" }],
+ product: [{ name: "Pricing", href: "/pricing" }],
company: [{ name: "Changelog", href: "/changelog" }],
+ resources: [{ name: "Metatags API", href: "/metatags" }],
legal: [
{ name: "Privacy", href: "/privacy" },
{ name: "Terms", href: "/terms" },
@@ -25,13 +26,13 @@ export default function Footer() {
return (
<footer className="z-10 border-t border-gray-200 bg-white/50 py-8 backdrop-blur-lg">
<MaxWidthWrapper className="pt-10">
- <div className="xl:grid xl:grid-cols-3 xl:gap-8">
- <div className="space-y-8">
+ <div className="xl:grid xl:grid-cols-5 xl:gap-8">
+ <div className="space-y-8 xl:col-span-2">
<Link href={createHref("/")}>
<span className="sr-only">Dub.sh Logo</span>
<Logo className="h-7 w-7 text-gray-600" />
</Link>
- <p className="text-sm leading-6 text-gray-500">
+ <p className="max-w-xs text-sm text-gray-500">
Giving modern marketing teams superpowers with short links that
stand out.
</p>
@@ -67,15 +68,12 @@ export default function Footer() {
</a>
</div>
</div>
- <div className="mt-16 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0">
+ <div className="mt-16 grid grid-cols-2 gap-8 xl:col-span-3 xl:mt-0">
<div className="md:grid md:grid-cols-2 md:gap-8">
- {/*
<div>
- <h3 className="text-sm font-semibold leading-6 text-gray-900">
- Features
- </h3>
- <ul role="list" className="mt-6 space-y-4">
- {navigation.features.map((item) => (
+ <h3 className="text-sm font-semibold text-gray-900">Product</h3>
+ <ul role="list" className="mt-4 space-y-4">
+ {navigation.product.map((item) => (
<li key={item.name}>
<Link
href={createHref(item.href)}
@@ -86,12 +84,11 @@ export default function Footer() {
</li>
))}
</ul>
- </div> */}
- <div className="hidden sm:block" />
- <div>
+ </div>
+ <div className="mt-10 md:mt-0">
<h3 className="text-sm font-semibold text-gray-600">Tools</h3>
- <ul role="list" className="mt-6 space-y-4">
- {navigation.tools.map((item) => (
+ <ul role="list" className="mt-4 space-y-4">
+ {navigation.company.map((item) => (
<li key={item.name}>
<Link
href={createHref(item.href)}
@@ -107,8 +104,8 @@ export default function Footer() {
<div className="md:grid md:grid-cols-2 md:gap-8">
<div>
<h3 className="text-sm font-semibold text-gray-600">Company</h3>
- <ul role="list" className="mt-6 space-y-4">
- {navigation.company.map((item) => (
+ <ul role="list" className="mt-4 space-y-4">
+ {navigation.resources.map((item) => (
<li key={item.name}>
<Link
href={createHref(item.href)}
@@ -122,7 +119,7 @@ export default function Footer() {
</div>
<div className="mt-10 md:mt-0">
<h3 className="text-sm font-semibold text-gray-600">Legal</h3>
- <ul role="list" className="mt-6 space-y-4">
+ <ul role="list" className="mt-4 space-y-4">
{navigation.legal.map((item) => (
<li key={item.name}>
<Link
diff --git a/app/ui/home/hero.tsx b/app/ui/home/hero.tsx
index 16518a7c95..7840088584 100644
--- a/app/ui/home/hero.tsx
+++ b/app/ui/home/hero.tsx
@@ -1,19 +1,19 @@
import { Github, Twitter } from "@/components/shared/icons";
+import Link from "next/link";
+import { ExpandingArrow } from "../icons";
const Hero = () => {
return (
- <div className="mx-auto mb-10 mt-20 max-w-md px-2.5 text-center sm:max-w-lg sm:px-0">
- <a
- href="https://dub.sh/launch"
- target="_blank"
- rel="noreferrer"
- className="mx-auto flex max-w-fit items-center justify-center space-x-2 overflow-hidden rounded-full bg-blue-100 px-7 py-2 transition-all hover:bg-blue-200"
+ <div className="mx-auto mb-10 mt-12 max-w-md px-2.5 text-center sm:max-w-lg sm:px-0">
+ <Link
+ href="/changelog/team-invites"
+ className="group mx-auto flex max-w-fit items-center justify-center space-x-2 overflow-hidden rounded-full border border-gray-200 bg-white px-7 py-2 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.1)] backdrop-blur transition-all hover:border-gray-300 hover:bg-white/50"
>
- <Twitter className="h-5 w-5 text-[#1d9bf0]" />
- <p className="text-sm font-semibold text-[#1d9bf0]">
- Introducing Dub.sh
+ <p className="text-sm font-semibold text-gray-700">
+ Introducing Team Invites
</p>
- </a>
+ <ExpandingArrow className="-ml-1 h-3.5 w-3.5" />
+ </Link>
<h1 className="mt-5 font-display text-4xl font-extrabold leading-[1.15] text-black sm:text-6xl sm:leading-[1.15]">
Short Links With
diff --git a/app/ui/home/logos.tsx b/app/ui/home/logos.tsx
index 57a417897f..9fb802d8ea 100644
--- a/app/ui/home/logos.tsx
+++ b/app/ui/home/logos.tsx
@@ -35,11 +35,15 @@ const logos = [
},
];
-export default function Logos() {
+export default function Logos({
+ copy = "Giving superpowers to marketing teams at world-class companies",
+}: {
+ copy?: string;
+}) {
return (
<div className="mt-20">
<p className="mx-auto max-w-sm text-center text-gray-600 sm:max-w-xl sm:text-lg">
- Giving superpowers to marketing teams at world-class companies
+ {copy}
</p>
<div className="mx-auto mt-8 grid w-full max-w-screen-lg grid-cols-2 items-center gap-5 px-5 sm:grid-cols-6 sm:px-0">
{logos.map(({ slug, link, dimensions }) => (
diff --git a/app/ui/home/nav.tsx b/app/ui/home/nav.tsx
index 33c125f35d..4aa155eae8 100644
--- a/app/ui/home/nav.tsx
+++ b/app/ui/home/nav.tsx
@@ -7,7 +7,9 @@ import useScroll from "#/lib/hooks/use-scroll";
import clsx from "clsx";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-const transparentHeaderSegments = new Set(["metatags"]);
+const navItems = ["pricing", "changelog"];
+
+const transparentHeaderSegments = new Set(["metatags", "pricing"]);
export default function Nav() {
const { domain = "dub.sh" } = useParams() as { domain: string };
@@ -42,18 +44,21 @@ export default function Nav() {
</Link>
<div className="flex items-center space-x-6">
- <Link
- href={
- domain === "dub.sh"
- ? "/changelog"
- : `https://dub.sh/changelog?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
- }
- className={`rounded-md text-sm font-medium ${
- segment === "changelog" ? "text-black" : "text-gray-500"
- } transition-colors ease-out hover:text-black`}
- >
- Changelog
- </Link>
+ {navItems.map((item) => (
+ <Link
+ key={item}
+ href={
+ domain === "dub.sh"
+ ? `/${item}`
+ : `https://dub.sh/${item}?utm_source=${domain}&utm_medium=referral&utm_campaign=custom-domain`
+ }
+ className={`rounded-md text-sm font-medium capitalize ${
+ segment === item ? "text-black" : "text-gray-500"
+ } transition-colors ease-out hover:text-black`}
+ >
+ {item}
+ </Link>
+ ))}
<Link
href={
process.env.NEXT_PUBLIC_VERCEL_ENV === "production"
diff --git a/app/ui/home/oss.tsx b/app/ui/home/oss.tsx
index f84d18607d..b741a08098 100644
--- a/app/ui/home/oss.tsx
+++ b/app/ui/home/oss.tsx
@@ -21,7 +21,7 @@ export default async function OSS() {
).then((res) => res.json());
return (
- <MaxWidthWrapper className="mb-20 py-20">
+ <div className="mt-28 border-t border-gray-200 bg-white/10 py-20 shadow-[inset_10px_-50px_94px_0_rgb(199,199,199,0.2)] backdrop-blur">
<div className="mx-auto max-w-md text-center sm:max-w-xl">
<h2 className="bg-gradient-to-r from-gray-800 via-gray-500 to-gray-800 bg-clip-text font-display text-4xl font-extrabold leading-tight text-transparent sm:text-5xl sm:leading-tight">
Proudly open-source
@@ -51,6 +51,6 @@ export default async function OSS() {
</div>
</a>
</div>
- </MaxWidthWrapper>
+ </div>
);
}
diff --git a/app/ui/home/pricing.tsx b/app/ui/home/pricing.tsx
index f4b0391e0c..742abc26b9 100644
--- a/app/ui/home/pricing.tsx
+++ b/app/ui/home/pricing.tsx
@@ -13,6 +13,7 @@ import Switch from "#/ui/switch";
import Tooltip from "#/ui/tooltip";
import { PLANS } from "@/lib/stripe/constants";
import { nFormatter } from "@/lib/utils";
+import { MinusCircle } from "lucide-react";
const pricingItems = [
{
@@ -20,7 +21,6 @@ const pricingItems = [
tagline: "For startups & side projects",
quota: 1000,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -33,6 +33,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Up to 3 users", neutral: true },
{
text: "Root domain redirect",
footnote:
@@ -53,7 +54,6 @@ const pricingItems = [
tagline: "For larger teams with increased usage",
quota: PLANS.find((p) => p.slug === "pro")!.quota,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -66,6 +66,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Unlimited users" },
{
text: "Root domain redirect",
footnote:
@@ -84,7 +85,6 @@ const pricingItems = [
tagline: "For businesses with custom needs",
quota: PLANS.find((p) => p.slug === "enterprise")!.quota,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -97,6 +97,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Unlimited users" },
{
text: "Root domain redirect",
footnote:
@@ -115,23 +116,23 @@ const pricingItems = [
},
];
-const Pricing = ({ homePage }: { homePage?: boolean }) => {
- const [annualBilling, setAnnualBilling] = useState(homePage ? false : true);
+const Pricing = () => {
+ const [annualBilling, setAnnualBilling] = useState(false);
const period = useMemo(
() => (annualBilling ? "yearly" : "monthly"),
[annualBilling],
);
return (
- <MaxWidthWrapper className="my-20 text-center">
- <div id="pricing" className="mx-auto my-10 sm:max-w-lg">
- <h2 className="font-display text-4xl font-extrabold text-black sm:text-5xl">
+ <MaxWidthWrapper className="mb-8 mt-16 text-center">
+ <div className="mx-auto mb-10 sm:max-w-lg">
+ <h1 className="font-display text-4xl font-extrabold text-black sm:text-5xl">
Simple,{" "}
<span className="bg-gradient-to-r from-blue-600 to-cyan-600 bg-clip-text text-transparent">
affordable
</span>{" "}
pricing
- </h2>
+ </h1>
<p className="mt-5 text-gray-600 sm:text-lg">
Shorten your links without breaking your bank. <br />
Start for free, no credit card required.
@@ -194,7 +195,7 @@ const Pricing = ({ homePage }: { homePage?: boolean }) => {
<p className="text-gray-600">
Up to {nFormatter(quota)} link clicks/mo
</p>
- <Tooltip content="If you exceed your monthly usage, your existing links will still work, but you need to upgrade to view their stats/add more links. Link clicks are shared across all projects.">
+ <Tooltip content="If you exceed your monthly usage, your existing links will still work, but you need to upgrade to view their stats/add more links.">
<div className="flex h-4 w-8 justify-center">
<QuestionCircle className="h-4 w-4 text-gray-600" />
</div>
@@ -202,10 +203,15 @@ const Pricing = ({ homePage }: { homePage?: boolean }) => {
</div>
</div>
<ul className="my-10 space-y-5 px-8">
- {features.map(({ text, footnote, negative }) => (
+ {features.map(({ text, footnote, neutral, negative }) => (
<li key={text} className="flex space-x-5">
<div className="flex-shrink-0">
- {negative ? (
+ {neutral ? (
+ <MinusCircle
+ fill="#D4D4D8"
+ className="h-6 w-6 text-white"
+ />
+ ) : negative ? (
<XCircleFill className="h-6 w-6 text-gray-300" />
) : (
<CheckCircleFill className="h-6 w-6 text-green-500" />
@@ -239,7 +245,11 @@ const Pricing = ({ homePage }: { homePage?: boolean }) => {
<div className="border-t border-gray-200" />
<div className="p-5">
<Link
- href="https://app.dub.sh/register"
+ href={
+ process.env.NODE_ENV === "production"
+ ? "https://app.dub.sh/register"
+ : "http://app.localhost:3000/register"
+ }
className={`${
plan === "Pro"
? "border border-transparent bg-gradient-to-r from-blue-600 to-cyan-600 text-white hover:border-blue-700 hover:bg-white hover:bg-clip-text hover:text-transparent"
diff --git a/app/ui/modals/link-qr-modal.tsx b/app/ui/modals/link-qr-modal.tsx
index 00f4c272d9..4888d2a7a0 100644
--- a/app/ui/modals/link-qr-modal.tsx
+++ b/app/ui/modals/link-qr-modal.tsx
@@ -235,7 +235,7 @@ function AdvancedSettings({ qrData, setFgColor, showLogo, setShowLogo }) {
<TooltipContent
title="As a freemium product, we rely on word of mouth to spread the word about Dub. If you'd like to remove the Dub logo/upload your own, please consider upgrading to a Pro plan."
cta="Upgrade to Pro"
- href={isApp ? "/settings" : "/#pricing"}
+ href={isApp ? "/settings" : "/pricing"}
/>
}
>
diff --git a/components/app/modals/link-qr-modal.tsx b/components/app/modals/link-qr-modal.tsx
index 8cb2a64ecd..d5462f8ebe 100644
--- a/components/app/modals/link-qr-modal.tsx
+++ b/components/app/modals/link-qr-modal.tsx
@@ -233,7 +233,7 @@ function AdvancedSettings({ qrData, setFgColor, showLogo, setShowLogo }) {
<TooltipContent
title="As a freemium product, we rely on word of mouth to spread the word about Dub. If you'd like to remove the Dub logo/upload your own, please consider upgrading to a Pro plan."
cta="Upgrade to Pro"
- href={isApp ? "/settings" : "/#pricing"}
+ href={isApp ? "/settings" : "/pricing"}
/>
}
>
diff --git a/components/app/modals/upgrade-plan-modal/pricing.tsx b/components/app/modals/upgrade-plan-modal/pricing.tsx
index c5fbed8b0d..4558ef93cd 100644
--- a/components/app/modals/upgrade-plan-modal/pricing.tsx
+++ b/components/app/modals/upgrade-plan-modal/pricing.tsx
@@ -16,6 +16,7 @@ import { getStripe } from "@/lib/stripe/client";
import { PLANS } from "@/lib/stripe/constants";
import { capitalize, nFormatter } from "@/lib/utils";
import useProject from "@/lib/swr/use-project";
+import { MinusCircle } from "lucide-react";
const pricingItems = [
{
@@ -23,7 +24,6 @@ const pricingItems = [
tagline: "For startups & side projects",
quota: 1000,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -36,6 +36,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Up to 3 users", neutral: true },
{
text: "Root domain redirect",
footnote:
@@ -56,7 +57,6 @@ const pricingItems = [
tagline: "For larger teams with increased usage",
quota: PLANS.find((p) => p.slug === "pro")!.quota,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -69,6 +69,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Unlimited users" },
{
text: "Root domain redirect",
footnote:
@@ -87,7 +88,6 @@ const pricingItems = [
tagline: "For businesses with custom needs",
quota: PLANS.find((p) => p.slug === "enterprise")!.quota,
features: [
- { text: "Unlimited users" },
{ text: "Unlimited branded links" },
{
text: "Unlimited custom domains",
@@ -100,6 +100,7 @@ const pricingItems = [
footnote:
"Password protection, link expiration, device targeting, custom social media cards, etc.",
},
+ { text: "Unlimited users" },
{
text: "Root domain redirect",
footnote:
@@ -202,7 +203,7 @@ const Pricing = ({ homePage }: { homePage?: boolean }) => {
<p className="text-gray-600">
Up to {nFormatter(quota)} link clicks/mo
</p>
- <Tooltip content="If you exceed your monthly usage, your existing links will still work, but you need to upgrade to view their stats/add more links. Link clicks are shared across all projects.">
+ <Tooltip content="If you exceed your monthly usage, your existing links will still work, but you need to upgrade to view their stats/add more links.">
<div className="flex h-4 w-8 justify-center">
<QuestionCircle className="h-4 w-4 text-gray-600" />
</div>
@@ -210,10 +211,15 @@ const Pricing = ({ homePage }: { homePage?: boolean }) => {
</div>
</div>
<ul className="my-10 space-y-5 px-8">
- {features.map(({ text, footnote, negative }) => (
+ {features.map(({ text, footnote, neutral, negative }) => (
<li key={text} className="flex space-x-5">
<div className="flex-shrink-0">
- {negative ? (
+ {neutral ? (
+ <MinusCircle
+ fill="#D4D4D8"
+ className="h-6 w-6 text-white"
+ />
+ ) : negative ? (
<XCircleFill className="h-6 w-6 text-gray-300" />
) : (
<CheckCircleFill className="h-6 w-6 text-green-500" />
diff --git a/components/shared/background/index.tsx b/components/shared/background/index.tsx
deleted file mode 100644
index 80234d8b28..0000000000
--- a/components/shared/background/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-"use client";
-
-import styles from "./background.module.css";
-
-export default function Background() {
- return (
- <div className={styles.main}>
- <div className={styles.content} />
- </div>
- );
-}
diff --git a/emails/BigUpdates.tsx b/emails/BigUpdates.tsx
index bb4f899f77..31fc365738 100644
--- a/emails/BigUpdates.tsx
+++ b/emails/BigUpdates.tsx
@@ -99,7 +99,7 @@ export default function BigUpdates({ slug }): JSX.Element {
) : (
<MjmlText cssClass="paragraph">
Check out our{" "}
- <a href="https://dub.sh#pricing" target="_blank">
+ <a href="https://dub.sh/pricing" target="_blank">
new pricing structure
</a>
.
diff --git a/package.json b/package.json
index 1aee3428cf..fd00671d5f 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,6 @@
"@radix-ui/react-tooltip": "^1.0.2",
"@splinetool/react-spline": "^2.2.3",
"@splinetool/runtime": "^0.9.146",
- "@stitches/react": "^1.2.8",
"@stripe/stripe-js": "^1.44.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
diff --git a/pages/app/login.tsx b/pages/app/login.tsx
index ce88f8da5c..d380169cf8 100644
--- a/pages/app/login.tsx
+++ b/pages/app/login.tsx
@@ -3,7 +3,7 @@ import { useState } from "react";
import { signIn } from "next-auth/react";
import Meta from "@/components/layout/meta";
import BlurImage from "#/ui/blur-image";
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import { toast } from "sonner";
import Button from "#/ui/button";
import { Google } from "@/components/shared/icons";
diff --git a/pages/app/register.tsx b/pages/app/register.tsx
index cbc0cca520..603f448b58 100644
--- a/pages/app/register.tsx
+++ b/pages/app/register.tsx
@@ -2,7 +2,7 @@ import { useState } from "react";
import { signIn } from "next-auth/react";
import Meta from "@/components/layout/meta";
import BlurImage from "#/ui/blur-image";
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import { Google } from "@/components/shared/icons";
import Button from "#/ui/button";
import { SSOWaitlist } from "#/ui/tooltip";
diff --git a/pages/app/welcome.tsx b/pages/app/welcome.tsx
index b15073392a..e1c863b623 100644
--- a/pages/app/welcome.tsx
+++ b/pages/app/welcome.tsx
@@ -1,5 +1,5 @@
import { useRouter } from "next/router";
-import Background from "@/components/shared/background";
+import Background from "#/ui/home/background";
import Intro from "@/components/app/welcome/intro";
import Interim from "@/components/app/welcome/interim";
import { AnimatePresence } from "framer-motion";
diff --git a/posts/changelog/improved-pricing.mdx b/posts/changelog/improved-pricing.mdx
index d00a8244c7..b083dff713 100644
--- a/posts/changelog/improved-pricing.mdx
+++ b/posts/changelog/improved-pricing.mdx
@@ -12,4 +12,4 @@ Thanks to that, we are increasing the limits of our Pro plan from 10,000 clicks
We have also sunsetted the previous [usage-based pricing model](https://twitter.com/dubdotsh/status/1579466952594292737) and consolidated everything into the Pro plan.
-Check out our [new pricing model](/#pricing).
+Check out our [new pricing model](/pricing).
diff --git a/posts/changelog/team-invites.mdx b/posts/changelog/team-invites.mdx
index fef394c600..ecc8b45f1b 100644
--- a/posts/changelog/team-invites.mdx
+++ b/posts/changelog/team-invites.mdx
@@ -10,4 +10,4 @@ You can now invite teammates to your Dub project. This is useful if you want to
Dub has the most generous free plan in the industry. You can invite up to 3 teammates to your project for free.
-Need to invite more teammates? Upgrade to our [Pro plan](/#pricing) for unlimited teammates.
+Need to invite more teammates? Upgrade to our [Pro plan](/pricing) for unlimited teammates.
diff --git a/tailwind.config.js b/tailwind.config.js
index 7f71522649..fc64ba3826 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -37,6 +37,9 @@ module.exports = {
"exit-to-left": "exit-to-left 0.25s ease",
"scale-in-content": "scale-in-content 0.2s ease",
"scale-out-content": "scale-out-content 0.2s ease",
+ // Accordion
+ "accordion-down": "accordion-down 300ms cubic-bezier(0.87, 0, 0.13, 1)",
+ "accordion-up": "accordion-up 300ms cubic-bezier(0.87, 0, 0.13, 1)",
// Custom wiggle animation
wiggle: "wiggle 0.75s infinite",
},
@@ -97,6 +100,15 @@ module.exports = {
"0%": { transform: "rotateX(0deg) scale(1)", opacity: 1 },
"100%": { transform: "rotateX(-10deg) scale(0.95)", opacity: 0 },
},
+ // Accordion
+ "accordion-down": {
+ from: { height: 0 },
+ to: { height: "var(--radix-accordion-content-height)" },
+ },
+ "accordion-up": {
+ from: { height: "var(--radix-accordion-content-height)" },
+ to: { height: 0 },
+ },
// Custom wiggle animation
wiggle: {
"0%, 100%": {
diff --git a/yarn.lock b/yarn.lock
index 0750b5ec2e..5c8798abb8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2014,11 +2014,6 @@
dependencies:
on-change "^4.0.0"
-"@stitches/react@^1.2.8":
- version "1.2.8"
- resolved "https://registry.yarnpkg.com/@stitches/react/-/react-1.2.8.tgz#954f8008be8d9c65c4e58efa0937f32388ce3a38"
- integrity sha512-9g9dWI4gsSVe8bNLlb+lMkBYsnIKCZTmvqvDG+Avnn69XfmHZKiaMrx7cgTaddq7aTPPmXiTsbFcUy0xgI4+wA==
-
"@stripe/stripe-js@^1.44.1":
version "1.44.1"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.44.1.tgz#376fdbed2b394c84deaa2041b8029b97e7eab3a7"