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.

Landing Page Improvements + minor bug fixes

Steven Teyeac6ddde855c
diff --git a/components/app/links/link-card.tsx b/components/app/links/link-card.tsx
index 715908c1bf..1597aefbf7 100644
--- a/components/app/links/link-card.tsx
+++ b/components/app/links/link-card.tsx
@@ -14,6 +14,7 @@ import {
Chart,
Delete,
Edit,
+ Eye,
LoadingDots,
QR,
ThreeDots,
@@ -32,7 +33,16 @@ import {
} from "@/lib/utils";
export default function LinkCard({ props }: { props: LinkProps }) {
- const { key, url, createdAt, archived, expiresAt } = props;
+ const {
+ key,
+ url,
+ title,
+ description,
+ image,
+ createdAt,
+ archived,
+ expiresAt,
+ } = props;
const apexDomain = getApexDomain(url);
@@ -134,6 +144,18 @@ export default function LinkCard({ props }: { props: LinkProps }) {
</p>
</a>
</Link>
+ {title && description && image && (
+ <a
+ href={`https://dub.sh/_proxy/${
+ domain || "dub.sh"
+ }/${encodeURI(key)}`}
+ target="_blank"
+ rel="noreferrer"
+ className="group rounded-full bg-gray-100 p-1.5 transition-all duration-75 hover:scale-105 hover:bg-blue-100 active:scale-95"
+ >
+ <Eye className="text-gray-700 transition-all group-hover:text-blue-800" />
+ </a>
+ )}
</div>
<h3 className="max-w-[200px] truncate text-sm font-medium text-gray-700 md:max-w-md lg:max-w-2xl xl:max-w-3xl">
{url}
diff --git a/components/app/modals/accept-invite-modal.tsx b/components/app/modals/accept-invite-modal.tsx
index fcd4cf0d7f..8d0b962f9b 100644
--- a/components/app/modals/accept-invite-modal.tsx
+++ b/components/app/modals/accept-invite-modal.tsx
@@ -59,6 +59,7 @@ function AcceptInviteModal({
headers: { "Content-Type": "application/json" },
}).then(() => {
toast.success("You now are a part of this project!");
+ mutate(`/api/projects`);
mutate(`/api/projects/${slug}`);
mutate(`/api/projects/${slug}/users`);
});
diff --git a/components/app/modals/add-edit-link-modal/advanced-settings.tsx b/components/app/modals/add-edit-link-modal/advanced-settings.tsx
index 31c634f619..6014ade819 100644
--- a/components/app/modals/add-edit-link-modal/advanced-settings.tsx
+++ b/components/app/modals/add-edit-link-modal/advanced-settings.tsx
@@ -88,7 +88,7 @@ export default function AdvancedSettings({
<div className="flex h-6 items-center justify-start space-x-2">
<ChevronRight className="h-5 w-5 shrink-0 text-gray-700 transition-all ease-in-out group-radix-state-open:rotate-90" />
<span className="text-sm font-medium text-gray-900">
- Custom OG Tags
+ Custom Social Previews
</span>
</div>
{title && description && image && (
diff --git a/components/app/modals/add-edit-link-modal/index.tsx b/components/app/modals/add-edit-link-modal/index.tsx
index c83dad9043..c76be8f0b5 100644
--- a/components/app/modals/add-edit-link-modal/index.tsx
+++ b/components/app/modals/add-edit-link-modal/index.tsx
@@ -301,10 +301,7 @@ function AddEditLinkModal({
{saving ? (
<LoadingDots color="#808080" />
) : (
- <IconMenu
- icon={props && <Save className="h-5 w-5" />}
- text={props ? "Save changes" : "Add link"}
- />
+ <p className="text-sm">{props ? "Save changes" : "Add link"}</p>
)}
</button>
</div>
diff --git a/components/app/modals/add-edit-link-modal/og-section.tsx b/components/app/modals/add-edit-link-modal/og-section.tsx
index 56129fa2f8..3bfc789a05 100644
--- a/components/app/modals/add-edit-link-modal/og-section.tsx
+++ b/components/app/modals/add-edit-link-modal/og-section.tsx
@@ -54,11 +54,11 @@ export default function OGSection({
return (
<motion.div key="og" className="grid gap-5" {...AnimationSettings}>
<p className="mt-2 block px-5 text-sm text-gray-500">
- If you use custom OG tags,{" "}
+ If you use custom social previews,{" "}
<span className="font-semibold text-black">
- be sure to set all 3 tags
+ be sure to set all 3 sections (title, description, image)
</span>
- , or the default tags of the target URL will be used.
+ , or the default OG tags of the target URL will be used.
</p>
<div className="border-t border-gray-200 px-5 pt-5 pb-2.5">
<div className="flex items-center justify-between">
@@ -66,7 +66,7 @@ export default function OGSection({
htmlFor="title"
className="block text-sm font-medium text-gray-700"
>
- OG Title
+ Link Title
</label>
<button
className={`${
@@ -104,7 +104,7 @@ export default function OGSection({
htmlFor="description"
className="block text-sm font-medium text-gray-700"
>
- OG Description
+ Link Description
</label>
<button
className={`${
@@ -141,7 +141,7 @@ export default function OGSection({
</div>
<div className="border-t border-gray-200 px-5 pt-5 pb-2.5">
- <p className="block text-sm font-medium text-gray-700">OG Image</p>
+ <p className="block text-sm font-medium text-gray-700">Link Image</p>
<label
htmlFor="image"
className="group mt-1 flex h-[10.5rem] cursor-pointer flex-col items-center justify-center rounded-md border border-gray-300 bg-white shadow-sm transition-all hover:bg-gray-50"
diff --git a/components/home/features.tsx b/components/home/features.tsx
index 13978ce54b..dbf15a8c69 100644
--- a/components/home/features.tsx
+++ b/components/home/features.tsx
@@ -1,178 +1,203 @@
-import Image from "next/future/image";
import Link from "next/link";
import {
Airplay,
Chart,
- Github,
QR,
- UploadCloud,
+ Users,
+ Link as LinkIcon,
} from "@/components/shared/icons";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import CountingNumbers from "../shared/counting-numbers";
-import styles from "./features.module.css";
+import { useState } from "react";
+import Accordion from "@/components/shared/accordion";
+import { AnimatePresence, motion } from "framer-motion";
+import { useLinkQRModal } from "../app/modals/link-qr-modal";
-const Features = ({ stars }: { stars: number }) => {
+const featureList = [
+ {
+ key: "analytics",
+ title: "Analytics that matter",
+ icon: <Chart className="h-5 w-5 text-gray-600" />,
+ description:
+ "Dub provides powerful analytics for your links, including geolocation, device, browser, and referrer information.",
+ cta: (
+ <Link
+ href={{ pathname: "/", query: { key: "github" } }}
+ as="/stats/github"
+ shallow
+ scroll={false}
+ >
+ <a className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black">
+ View demo
+ </a>
+ </Link>
+ ),
+ demo: "https://dubhq.s3.amazonaws.com/analytics.mp4",
+ },
+ {
+ key: "domains",
+ title: "Use your own domain",
+ icon: <Airplay className="h-5 w-5 text-gray-600" />,
+ description:
+ "Dub offers free custom domains on all plans - start personalizing your links today.",
+ cta: (
+ <a
+ href="https://app.dub.sh"
+ target="_blank"
+ rel="noreferrer"
+ className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
+ >
+ Create your project
+ </a>
+ ),
+ demo: "https://dubhq.s3.amazonaws.com/custom-domain.mp4",
+ },
+ {
+ key: "links",
+ title: "Links with superpowers",
+ icon: <LinkIcon className="h-5 w-5 text-gray-600" />,
+ description:
+ "Create links with custom social previews, UTM parameters, password protection, and expiration dates.",
+ cta: (
+ <a
+ href="https://app.dub.sh"
+ target="_blank"
+ rel="noreferrer"
+ className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
+ >
+ Create your project
+ </a>
+ ), //custom cta
+ demo: "https://dubhq.s3.amazonaws.com/og.mp4",
+ },
+ {
+ key: "qr",
+ title: "Free QR code generator",
+ icon: <QR className="h-5 w-5 text-gray-600" />,
+ description:
+ "QR codes and short links are like peas in a pod. That's why we've built a QR code generator right into Dub.",
+ cta: "View demo", //custom cta
+ demo: "https://dubhq.s3.amazonaws.com/qr.mp4",
+ },
+ {
+ key: "team",
+ title: "Collaborate with your team",
+ icon: <Users className="h-5 w-5 text-gray-600" />,
+ description:
+ "With Dub, you can invite unlimited team members to collaborate on your project for free - no more sharing logins via Google groups.",
+ cta: (
+ <a
+ href="https://app.dub.sh"
+ target="_blank"
+ rel="noreferrer"
+ className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
+ >
+ Invite your teammates
+ </a>
+ ),
+ demo: "https://dubhq.s3.amazonaws.com/team.mp4",
+ },
+];
+
+export default function Features() {
+ const [activeFeature, setActiveFeature] = useState(0);
+ const { setShowLinkQRModal, LinkQRModal } = useLinkQRModal({
+ props: {
+ key: "github",
+ url: "https://github.com/steven-tey/dub",
+ },
+ });
return (
<div>
+ <LinkQRModal />
<MaxWidthWrapper className="py-20">
- <div className="mx-auto max-w-sm text-center sm:max-w-md">
+ <div className="mx-auto max-w-md text-center sm:max-w-xl">
<h2 className="font-display text-4xl font-extrabold leading-tight text-black sm:text-5xl sm:leading-tight">
- Fast.{" "}
<span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
- Powerful.
+ Powerful
+ </span>{" "}
+ features for{" "}
+ <span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
+ modern
</span>{" "}
- Open source.
+ marketing teams
</h2>
<p className="mt-5 text-gray-600 sm:text-lg">
- With Dub, you get the best of both worlds: a powerful link shortener
- with built-in analytics, and the freedom to host it yourself.
+ Dub is more than just a link shortener. We've built a suite of
+ powerful features that gives you marketing superpowers.
</p>
</div>
- {/* Analytics */}
- <div className="my-20 flex flex-col-reverse items-center lg:flex-row lg:space-x-10">
- <div className="my-10 flex flex-col space-y-5 lg:my-0">
- <div className="flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-r from-purple-600 to-pink-600">
- <Chart className="h-7 w-7 text-white" />
- </div>
- <h3 className="mt-5 font-display text-3xl font-bold text-black">
- Built-in analytics
- </h3>
-
- <p className="mt-3 text-gray-500">
- Dub provides powerful analytics for your links, including
- geolocation, device, and browser information.
- </p>
- <Link
- href={{ pathname: "/", query: { key: "github" } }}
- as="/stats/github"
- shallow
- scroll={false}
- >
- <a className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black">
- View demo
- </a>
- </Link>
- </div>
-
- <Image
- src="/_static/landing/analytics.png"
- alt="Built-in analytics"
- width={1120}
- height={919}
- className="w-full max-w-[700px] shadow-lg"
- />
- </div>
-
- {/* Custom Domains */}
- <div className="my-20 flex flex-col items-center lg:flex-row lg:space-x-16">
- <Image
- src="/_static/landing/domains.png"
- alt="Custom domains"
- width={1084}
- height={646}
- className="w-full max-w-[635px] rounded-2xl border border-gray-200 shadow-lg"
- />
- <div className="my-10 flex flex-col space-y-5 lg:my-0">
- <div className="flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-r from-purple-600 to-pink-600">
- <Airplay className="h-7 w-7 text-white" />
- </div>
- <h3 className="mt-5 font-display text-3xl font-bold text-black">
- Free custom domains
- </h3>
-
- <p className="mt-3 text-gray-500">
- At Dub, we believe that you should be able to use your own domain
- when building your brand. That's why we offer free custom domains
- on all plans.
- </p>
- <Link href="https://app.dub.sh">
- <a className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black">
- Create your project
- </a>
- </Link>
- </div>
- </div>
-
- {/* QR Code */}
- <div className="my-20 flex flex-col-reverse items-center lg:flex-row lg:space-x-10">
- <div className="my-10 flex max-w-md flex-col space-y-5 lg:my-0">
- <div className="flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-r from-purple-600 to-pink-600">
- <QR className="h-7 w-7 text-white" />
- </div>
- <h3 className="mt-5 font-display text-3xl font-bold text-black">
- QR code generator
- </h3>
-
- <p className="mt-3 text-gray-500">
- We also believe QR codes and short links are like peas in a pod.
- That's why we've built a QR code generator right into Dub.
- </p>
- <a
- href="https://dub.sh/qrcode"
- target="_blank"
- rel="noreferrer"
- className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
- >
- Watch the demo
- </a>
- </div>
-
- <Image
- src="/_static/landing/qr.png"
- alt="Custom domains"
- width={1084}
- height={646}
- className="w-full max-w-[700px] rounded-2xl border border-gray-200 shadow-lg"
- />
- </div>
-
- {/* Open Source */}
- <div className="my-20 flex flex-col items-center lg:flex-row lg:space-x-16">
- <div className="flex h-96 w-full max-w-[700px] items-center justify-center rounded-2xl bg-gray-900 shadow-lg">
- <div className="flex items-center">
- <a
- href="https://github.com/steven-tey/dub"
- target="_blank"
- rel="noreferrer"
- className="flex h-10 items-center space-x-2 rounded-md border border-gray-600 bg-gray-800 p-4"
- >
- <Github className="h-5 w-5 text-white" />
- <p className="font-medium text-white">Star</p>
- </a>
- <div className={styles.label}>
- <CountingNumbers
- value={stars}
- className="font-display font-medium text-white"
- />
- </div>
- </div>
- </div>
- <div className="my-10 flex flex-col space-y-5 lg:my-0">
- <div className="flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-r from-purple-600 to-pink-600">
- <UploadCloud className="h-7 w-7 text-white" />
+ <div className="my-10 h-[840px] w-full overflow-hidden rounded-lg 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: (
+ <div className="flex items-center space-x-3 p-3">
+ {icon}
+ <p className="text-base font-semibold text-gray-600">
+ {title}
+ </p>
+ </div>
+ ),
+ content: (
+ <div className="p-3">
+ <p className="mb-4 text-sm text-gray-500">
+ {description}
+ </p>
+ {key === "qr" ? (
+ <button
+ onClick={() => setShowLinkQRModal(true)}
+ className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
+ >
+ View demo
+ </button>
+ ) : (
+ cta
+ )}
+ </div>
+ ),
+ }),
+ )}
+ activeTab={activeFeature}
+ setActiveTab={setActiveFeature}
+ />
+ <div className="lg:col-span-2">
+ <AnimatePresence mode="wait">
+ {featureList.map((feature, index) => {
+ if (index === activeFeature) {
+ return (
+ <motion.div
+ key={feature.title}
+ initial={{
+ y: 10,
+ opacity: 0,
+ }}
+ animate={{ y: 0, opacity: 1 }}
+ exit={{
+ y: -10,
+ opacity: 0,
+ }}
+ transition={{
+ duration: 0.15,
+ stiffness: 300,
+ damping: 30,
+ }}
+ className="min-h-[600px] w-full overflow-hidden whitespace-nowrap rounded-2xl bg-white shadow-2xl lg:mt-10 lg:w-[800px]"
+ >
+ <video autoPlay muted loop>
+ <source src={feature.demo} type="video/mp4" />
+ Your browser does not support the video tag.
+ </video>
+ </motion.div>
+ );
+ }
+ })}
+ </AnimatePresence>
</div>
- <h3 className="mt-5 font-display text-3xl font-bold text-black">
- Proudly open source
- </h3>
-
- <p className="mt-3 text-gray-500">
- Our source code is available on GitHub - feel free to read,
- review, or contribute to it however you want!
- </p>
- <a
- href="https://github.com/steven-tey/dub"
- target="_blank"
- rel="noreferrer"
- className="block max-w-fit rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black"
- >
- Star on GitHub
- </a>
</div>
</div>
</MaxWidthWrapper>
</div>
);
-};
-
-export default Features;
+}
diff --git a/components/home/oss.tsx b/components/home/oss.tsx
new file mode 100644
index 0000000000..6a43aa74c8
--- /dev/null
+++ b/components/home/oss.tsx
@@ -0,0 +1,40 @@
+import { Github, UploadCloud } from "@/components/shared/icons";
+import CountingNumbers from "../shared/counting-numbers";
+import MaxWidthWrapper from "../shared/max-width-wrapper";
+import styles from "./features.module.css";
+
+export default function OSS({ stars }: { stars: number }) {
+ return (
+ <MaxWidthWrapper className="mb-20 py-20">
+ <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
+ </h2>
+ <p className="mt-5 text-gray-600 sm:text-lg">
+ Our source code is available on GitHub - feel free to read, review, or
+ contribute to it however you want!
+ </p>
+ </div>
+ <div className="flex items-center justify-center py-10">
+ <a
+ href="https://github.com/steven-tey/dub"
+ target="_blank"
+ rel="noreferrer"
+ >
+ <div className="flex items-center">
+ <div className="flex h-10 items-center space-x-2 rounded-md border border-gray-600 bg-gray-800 p-4">
+ <Github className="h-5 w-5 text-white" />
+ <p className="font-medium text-white">Star</p>
+ </div>
+ <div className={styles.label}>
+ <CountingNumbers
+ value={stars}
+ className="font-display font-medium text-white"
+ />
+ </div>
+ </div>
+ </a>
+ </div>
+ </MaxWidthWrapper>
+ );
+}
diff --git a/components/home/pricing.tsx b/components/home/pricing.tsx
index 89cac23062..38c1cde532 100644
--- a/components/home/pricing.tsx
+++ b/components/home/pricing.tsx
@@ -26,14 +26,14 @@ const pricingItems = [
},
{ text: "Unlimited branded links" },
{ text: "5 projects" },
+ { text: "Password-protected links" },
+ { text: "Custom Social Previews", footnote: <OGImageProxy /> },
{
text: "Root domain redirect",
footnote:
"Redirect vistors that land on the root of your domain (e.g. yourdomain.com) to a page of your choice.",
negative: true,
},
- { text: "Password-protected links", negative: true },
- { text: "OG Image Proxy", footnote: <OGImageProxy />, negative: true },
{ text: "SSO/SAML", negative: true },
],
cta: "Start for free",
@@ -50,13 +50,13 @@ const pricingItems = [
},
{ text: "Unlimited branded links" },
{ text: "Unlimited projects" },
+ { text: "Password-protected links" },
+ { text: "Custom Social Previews", footnote: <OGImageProxy /> },
{
text: "Root domain redirect",
footnote:
"Redirect vistors that land on the root of your domain (e.g. yourdomain.com) to a page of your choice.",
},
- { text: "Password-protected links" },
- { text: "OG Image Proxy", footnote: <OGImageProxy /> },
{ text: "SSO/SAML", negative: true },
],
cta: "Get started",
@@ -74,13 +74,13 @@ const pricingItems = [
},
{ text: "Unlimited branded links" },
{ text: "Unlimited projects" },
+ { text: "Password-protected links" },
+ { text: "Custom Social Previews", footnote: <OGImageProxy /> },
{
text: "Root domain redirect",
footnote:
"Redirect vistors that land on the root of your domain (e.g. yourdomain.com) to a page of your choice.",
},
- { text: "Password-protected links" },
- { text: "OG Image Proxy", footnote: <OGImageProxy /> },
{ text: "SSO/SAML" },
],
cta: "Contact us",
@@ -90,14 +90,14 @@ const pricingItems = [
const Pricing = () => {
const [tier, setTier] = useState(0);
- const [annualBilling, setAnnualBilling] = useState(true);
+ const [annualBilling, setAnnualBilling] = useState(false);
const period = useMemo(
() => (annualBilling ? "yearly" : "monthly"),
[annualBilling],
);
return (
- <MaxWidthWrapper className="mt-20 mb-40 text-center">
+ <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">
Simple,{" "}
@@ -122,9 +122,10 @@ const Pricing = () => {
trackDimensions="h-6 w-12"
thumbDimensions="h-5 w-5"
thumbTranslate="translate-x-6"
+ checked={false}
/>
<p className="text-gray-600">Billed Annually</p>
- <span className="absolute -top-8 -right-12 rounded-full bg-purple-200 px-3 py-1 text-sm text-purple-700 sm:-top-2 sm:-right-36">
+ <span className="absolute -top-8 -right-12 rounded-full bg-purple-200 px-3 py-1 text-sm text-purple-700 sm:-right-[9.5rem] sm:-top-2">
🎁 2 months FREE
</span>
</div>
diff --git a/components/layout/app/index.tsx b/components/layout/app/index.tsx
index e65559216a..f77ea11296 100644
--- a/components/layout/app/index.tsx
+++ b/components/layout/app/index.tsx
@@ -32,13 +32,13 @@ export default function AppLayout({
return (
<div>
<Meta />
- <Script
+ {/* <Script
id="script-crisp"
dangerouslySetInnerHTML={{
__html: CRISP_SCRIPT,
}}
strategy="lazyOnload"
- />
+ /> */}
<Toaster />
<div
className={`min-h-screen w-full ${bgWhite ? "bg-white" : "bg-gray-50"}`}
diff --git a/components/shared/accordion.tsx b/components/shared/accordion.tsx
new file mode 100644
index 0000000000..2a019a6164
--- /dev/null
+++ b/components/shared/accordion.tsx
@@ -0,0 +1,61 @@
+import React, { ReactNode } from "react";
+import { styled, keyframes } from "@stitches/react";
+import { ChevronDown } from "./icons";
+import * as AccordionPrimitive from "@radix-ui/react-accordion";
+
+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 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)`,
+ },
+});
+
+// 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))}
+ >
+ {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>
+ );
+}
diff --git a/components/shared/icons/archive.tsx b/components/shared/icons/archive.tsx
index f06cdd1a9e..92c9fad450 100644
--- a/components/shared/icons/archive.tsx
+++ b/components/shared/icons/archive.tsx
@@ -3,7 +3,7 @@ export default function Archive({ className }: { className: string }) {
<svg
fill="none"
height="24"
- shape-rendering="geometricPrecision"
+ shapeRendering="geometricPrecision"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/delete.tsx b/components/shared/icons/delete.tsx
index 489d0f643e..e1bb463048 100644
--- a/components/shared/icons/delete.tsx
+++ b/components/shared/icons/delete.tsx
@@ -3,7 +3,7 @@ export default function Delete({ className }: { className: string }) {
<svg
fill="none"
height="24"
- shape-rendering="geometricPrecision"
+ shapeRendering="geometricPrecision"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/edit.tsx b/components/shared/icons/edit.tsx
index f18272261c..863feb49d1 100644
--- a/components/shared/icons/edit.tsx
+++ b/components/shared/icons/edit.tsx
@@ -3,7 +3,7 @@ export default function Edit({ className }: { className: string }) {
<svg
fill="none"
height="24"
- shape-rendering="geometricPrecision"
+ shapeRendering="geometricPrecision"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/eye.tsx b/components/shared/icons/eye.tsx
new file mode 100644
index 0000000000..bf420cf459
--- /dev/null
+++ b/components/shared/icons/eye.tsx
@@ -0,0 +1,19 @@
+export default function Eye({ className }: { className: string }) {
+ return (
+ <svg
+ fill="none"
+ shapeRendering="geometricPrecision"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ viewBox="0 0 24 24"
+ width="14"
+ height="14"
+ className={className}
+ >
+ <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" />
+ <circle cx="12" cy="12" r="3" />{" "}
+ </svg>
+ );
+}
diff --git a/components/shared/icons/index.tsx b/components/shared/icons/index.tsx
index 5935ccce66..490f3fd100 100644
--- a/components/shared/icons/index.tsx
+++ b/components/shared/icons/index.tsx
@@ -41,3 +41,5 @@ export { default as Archive } from "./archive";
export { default as Delete } from "./delete";
export { default as Logout } from "./logout";
export { default as Save } from "./save";
+export { default as Users } from "./users";
+export { default as Eye } from "./eye";
diff --git a/components/shared/icons/logout.tsx b/components/shared/icons/logout.tsx
index 87a4ad4c26..249410ae4e 100644
--- a/components/shared/icons/logout.tsx
+++ b/components/shared/icons/logout.tsx
@@ -3,7 +3,7 @@ export default function Logout({ className }: { className: string }) {
<svg
fill="none"
height="24"
- shape-rendering="geometricPrecision"
+ shapeRendering="geometricPrecision"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/save.tsx b/components/shared/icons/save.tsx
index 8244e1aa94..19387b231c 100644
--- a/components/shared/icons/save.tsx
+++ b/components/shared/icons/save.tsx
@@ -3,7 +3,7 @@ export default function Save({ className }: { className: string }) {
<svg
fill="none"
height="24"
- shape-rendering="geometricPrecision"
+ shapeRendering="geometricPrecision"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/users.tsx b/components/shared/icons/users.tsx
new file mode 100644
index 0000000000..d6692fcc05
--- /dev/null
+++ b/components/shared/icons/users.tsx
@@ -0,0 +1,21 @@
+export default function Users({ className }: { className: string }) {
+ return (
+ <svg
+ fill="none"
+ height="24"
+ shapeRendering="geometricPrecision"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ viewBox="0 0 24 24"
+ width="24"
+ className={className}
+ >
+ <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
+ <circle cx="9" cy="7" r="4"></circle>
+ <path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
+ <path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
+ </svg>
+ );
+}
diff --git a/components/shared/switch.tsx b/components/shared/switch.tsx
index 5b5abb1226..36ac55351a 100644
--- a/components/shared/switch.tsx
+++ b/components/shared/switch.tsx
@@ -7,17 +7,19 @@ const Switch = ({
trackDimensions = "h-4 w-8",
thumbDimensions = "h-3 w-3",
thumbTranslate = "translate-x-4",
+ checked = true,
disabled = false,
}: {
fn: Dispatch<SetStateAction<boolean>> | (() => void);
trackDimensions?: string;
thumbDimensions?: string;
thumbTranslate?: string;
+ checked?: boolean;
disabled?: boolean;
}) => {
return (
<SwitchPrimitive.Root
- defaultChecked={true}
+ defaultChecked={checked}
onCheckedChange={(checked) => fn(checked)}
disabled={disabled}
className={cx(
diff --git a/lib/qr/index.tsx b/lib/qr/index.tsx
index c1cc4d98be..2b7d27238a 100644
--- a/lib/qr/index.tsx
+++ b/lib/qr/index.tsx
@@ -469,6 +469,7 @@ export async function getQRAsCanvas(props: QRProps, type: string) {
);
const image = new Image();
+ image.crossOrigin = "anonymous";
if (calculatedImageSettings) {
await waitUntilImageLoaded(image, imageSettings.src);
if (calculatedImageSettings.excavation != null) {
diff --git a/package.json b/package.json
index beef297477..fa1dc4b0fa 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
"@radix-ui/react-slider": "^1.0.0",
"@radix-ui/react-switch": "^1.0.0",
"@radix-ui/react-tooltip": "^1.0.0",
+ "@stitches/react": "^1.2.8",
"@stripe/stripe-js": "^1.36.0",
"@tailwindcss/forms": "^0.5.3",
"@upstash/qstash": "^0.1.7",
diff --git a/pages/index.tsx b/pages/index.tsx
index 0f437c81ef..a1a586d8a1 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -9,6 +9,7 @@ import Hero from "@/components/home/hero";
import Logos from "@/components/home/logos";
import Pricing from "@/components/home/pricing";
import HomeLayout from "@/components/layout/home";
+import OSS from "@/components/home/oss";
export default function Home({ stars }: { stars: number }) {
const router = useRouter();
@@ -42,8 +43,9 @@ export default function Home({ stars }: { stars: number }) {
<Demo />
<Logos />
<Globe />
- <Features stars={stars} />
+ <Features />
<Pricing />
+ <OSS stars={stars} />
</div>
<Background />
</HomeLayout>
diff --git a/yarn.lock b/yarn.lock
index af609e17d3..7cd831183d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1196,6 +1196,11 @@
resolved "https://registry.yarnpkg.com/@reecelucas/react-use-hotkeys/-/react-use-hotkeys-1.3.5.tgz#14006121e52b86695c12b0502fe4c0e333ad36e5"
integrity sha512-mzogZ/zykHd9F88V9zwh+7ZVzlHomGjz4ztOCkHBSHmAPrM4fF4z3TMPaG4YSykB03spuVh6GbKAkSNY1rUDBQ==
+"@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.36.0":
version "1.36.0"
resolved "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.36.0.tgz"