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.

Finish Create Workspace page

Tim Wilson89d1c48b6654
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/layout.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/layout.tsx
index 6515322e25..e5e95e8fea 100644
--- a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/layout.tsx
+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/layout.tsx
@@ -6,7 +6,7 @@ export default function Layout({ children }: PropsWithChildren) {
<>
<div className="relative flex flex-col items-center">
<Wordmark className="mt-6 h-8" />
- <div className="animate-slide-up-fade mt-8 flex flex-col items-center px-3 [--offset:10px] [animation-duration:1s] [animation-fill-mode:both] md:mt-24 lg:px-8">
+ <div className="mt-8 flex flex-col items-center px-3 md:mt-24 lg:px-8">
{children}
</div>
</div>
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/link/page.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/link/page.tsx
new file mode 100644
index 0000000000..7732174757
--- /dev/null
+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/link/page.tsx
@@ -0,0 +1,15 @@
+import { LinkBroken } from "@dub/ui/src/icons";
+import { StepPage } from "../step-page";
+// import { Form } from "./form";
+
+export default function Link() {
+ return (
+ <StepPage
+ icon={LinkBroken}
+ title="Create a link"
+ description="Don't worry, you can edit this later."
+ >
+ {/* <Form /> */}
+ </StepPage>
+ );
+}
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-icon.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-icon.tsx
deleted file mode 100644
index 180868c6f0..0000000000
--- a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-icon.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Icon } from "@dub/ui";
-
-export function StepIcon({ icon: Icon }: { icon: Icon }) {
- return (
- <div className="rounded-full border border-gray-200 bg-white p-2.5">
- <Icon className="size-[18px]" />
- </div>
- );
-}
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-page.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-page.tsx
new file mode 100644
index 0000000000..649f8665b9
--- /dev/null
+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/step-page.tsx
@@ -0,0 +1,41 @@
+import { Icon } from "@dub/ui";
+import { cn } from "@dub/utils";
+import { PropsWithChildren, ReactNode } from "react";
+
+export function StepPage({
+ children,
+ icon: Icon,
+ title,
+ description,
+ className,
+}: PropsWithChildren<{
+ icon?: Icon;
+ title: ReactNode;
+ description: ReactNode;
+ className?: string;
+}>) {
+ return (
+ <div
+ className={cn(
+ "mx-auto flex max-w-sm flex-col items-center",
+ "animate-slide-up-fade [--offset:10px] [animation-duration:1s] [animation-fill-mode:both]",
+ className,
+ )}
+ >
+ {Icon && <StepIcon icon={Icon} />}
+ <h1 className="mt-4 text-2xl font-medium leading-tight">{title}</h1>
+ <p className="mt-1.5 text-base leading-tight text-gray-500">
+ {description}
+ </p>
+ {children}
+ </div>
+ );
+}
+
+function StepIcon({ icon: Icon }: { icon: Icon }) {
+ return (
+ <div className="rounded-full border border-gray-200 bg-white p-2.5">
+ <Icon className="size-[18px]" />
+ </div>
+ );
+}
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/form.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/form.tsx
new file mode 100644
index 0000000000..40bd49db09
--- /dev/null
+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/form.tsx
@@ -0,0 +1,17 @@
+"use client";
+
+import { CreateWorkspaceForm } from "@/ui/workspaces/create-workspace-form";
+import { useRouter } from "next/navigation";
+
+export function Form() {
+ const router = useRouter();
+
+ return (
+ <CreateWorkspaceForm
+ className="mt-8"
+ onSuccess={() => {
+ router.push("/onboarding/link");
+ }}
+ />
+ );
+}
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/page.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/page.tsx
index 3fcaced9a2..182f4c69f0 100644
--- a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/page.tsx
+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/workspace/page.tsx
@@ -1,13 +1,23 @@
-import { CreateWorkspaceForm } from "@/ui/workspaces/create-workspace-form";
import { GridPlus } from "@dub/ui/src/icons";
-import { StepIcon } from "../step-icon";
+import { StepPage } from "../step-page";
+import { Form } from "./form";
export default function Workspace() {
return (
- <div className="mx-auto flex max-w-sm flex-col items-center">
- <StepIcon icon={GridPlus} />
- <h1 className="mt-4 text-lg font-medium">Create a workspace</h1>
- <CreateWorkspaceForm className="mt-8" />
- </div>
+ <StepPage
+ icon={GridPlus}
+ title="Create a workspace"
+ description={
+ <a
+ href="https://dub.co/help/article/what-is-a-workspace"
+ target="_blank"
+ className="underline transition-colors hover:text-gray-700"
+ >
+ What is a workspace?
+ </a>
+ }
+ >
+ <Form />
+ </StepPage>
);
}
diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.ts
index dacf618c8c..c271c618b7 100644
--- a/packages/ui/src/icons/nucleo/index.ts
+++ b/packages/ui/src/icons/nucleo/index.ts
@@ -50,6 +50,7 @@ export * from "./input-password";
export * from "./invoice-dollar";
export * from "./key";
export * from "./lines-y";
+export * from "./link-broken";
export * from "./magnifier";
export * from "./map-position";
export * from "./menu3";
diff --git a/packages/ui/src/icons/nucleo/link-broken.tsx b/packages/ui/src/icons/nucleo/link-broken.tsx
new file mode 100644
index 0000000000..f124f13071
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/link-broken.tsx
@@ -0,0 +1,76 @@
+import { SVGProps } from "react";
+
+export function LinkBroken(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M8.5,6.827c-.352,.168-.682,.398-.973,.69l-.01,.01c-1.381,1.381-1.381,3.619,0,5l2.175,2.175c1.381,1.381,3.619,1.381,5,0l.01-.01c1.381-1.381,1.381-3.619,0-5l-.931-.931"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M9.5,11.173c.352-.168,.682-.398,.973-.69l.01-.01c1.381-1.381,1.381-3.619,0-5l-2.175-2.175c-1.381-1.381-3.619-1.381-5,0l-.01,.01c-1.381,1.381-1.381,3.619,0,5l.931,.931"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="12.25"
+ x2="13"
+ y1="3.75"
+ y2="1.5"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="14.25"
+ x2="16.5"
+ y1="5.75"
+ y2="5"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="3.75"
+ x2="1.5"
+ y1="12.25"
+ y2="13"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="5.75"
+ x2="5"
+ y1="14.25"
+ y2="16.5"
+ />
+ </g>
+ </svg>
+ );
+}