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.

Workspace onboarding improvements

Marcus Farrell6ff6cd2a142a
diff --git a/apps/web/app/app.dub.co/(onboarding)/layout.tsx b/apps/web/app/app.dub.co/(onboarding)/layout.tsx
index 93d5518c6a..8e65fe3194 100644
--- a/apps/web/app/app.dub.co/(onboarding)/layout.tsx
+++ b/apps/web/app/app.dub.co/(onboarding)/layout.tsx
@@ -1,11 +1,36 @@
+"use client";
+
import Toolbar from "@/ui/layout/toolbar/toolbar";
import { PropsWithChildren } from "react";
+import { usePathname } from "next/navigation";
+import { signOut } from "next-auth/react";
+import { Button } from "@dub/ui";
export default function Layout({ children }: PropsWithChildren) {
+ const pathname = usePathname();
+ const isWorkspacePage = pathname === "/onboarding/workspace";
+
return (
<>
{children}
<Toolbar show={["help"]} />
+ {isWorkspacePage && (
+ <div className="fixed bottom-0 left-0 z-40 m-5">
+ <Button
+ variant="secondary"
+ text="Back to sign in"
+ size="sm"
+ onClick={() =>
+ signOut({
+ callbackUrl: "/login",
+ })
+ }
+ className="h-8 text-xs rounded-lg px-3 shadow-sm"
+ >
+ Back to sign in
+ </Button>
+ </div>
+ )}
</>
);
}
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 aad9c80eae..365c1c41e0 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
@@ -7,7 +7,7 @@ export default function Workspace() {
title="Create your workspace"
description={
<>
- Set up a common space to manage your links with your team.{" "}
+ Set up a shared space to manage your links with your team.{" "}
<a
href="https://dub.co/help/article/what-is-a-workspace"
target="_blank"
diff --git a/apps/web/ui/workspaces/create-workspace-form.tsx b/apps/web/ui/workspaces/create-workspace-form.tsx
index 2a1d525bc3..9eebc0e207 100644
--- a/apps/web/ui/workspaces/create-workspace-form.tsx
+++ b/apps/web/ui/workspaces/create-workspace-form.tsx
@@ -138,7 +138,7 @@ export function CreateWorkspaceForm({
<div>
<label htmlFor="slug" className="flex items-center space-x-2">
<p className="block text-sm font-medium text-neutral-700">
- Workspace Slug
+ Slug
</p>
</label>
<div className="relative mt-2 flex rounded-md shadow-sm">
@@ -204,7 +204,7 @@ export function CreateWorkspaceForm({
<div>
<label>
<p className="block text-sm font-medium text-neutral-700">
- Workspace Logo
+ Logo
</p>
<div className="mt-1.5 flex items-center gap-5">
<Controller