Skip to content

Open source CapCut alternative.

TypeScript

feat(site): Cut landing signed-in pill opens the Cut app

David Leb0fd7f02925f
diff --git a/site/src/app/_components/landing/TopNav.tsx b/site/src/app/_components/landing/TopNav.tsx
index 8ed8ed05..2f5cbda4 100644
--- a/site/src/app/_components/landing/TopNav.tsx
+++ b/site/src/app/_components/landing/TopNav.tsx
@@ -19,6 +19,9 @@ type Props = {
showAuthLinks?: boolean;
// Sign-in/up pages swap the auth links for a single toggle to the other mode.
authToggle?: { href: string; label: string };
+ // Signed-in pill into the product. The Cut landing points it at the Cut
+ // projects home, which lives under a different base per host.
+ signedInPill?: { href: string; label: string };
};
export function TopNav({
@@ -26,6 +29,7 @@ export function TopNav({
wordmark = "Donkey",
showAuthLinks = true,
authToggle,
+ signedInPill = { href: "/app", label: "Dashboard" },
}: Props) {
// Signed-in visitors don't need the auth links or the download CTA; the whole
// right cluster collapses to a single white button into the product. During the
@@ -74,8 +78,8 @@ export function TopNav({
</Link>
<div className="flex items-center gap-[10px] md:gap-4">
{isSignedIn ? (
- <PillButton href="/app" variant="secondary" size="sm">
- Dashboard
+ <PillButton href={signedInPill.href} variant="secondary" size="sm">
+ {signedInPill.label}
</PillButton>
) : authToggle ? (
<Link
diff --git a/site/src/app/cut/_components/landing/CutLanding.tsx b/site/src/app/cut/_components/landing/CutLanding.tsx
index 78a0e2b8..16b31d53 100644
--- a/site/src/app/cut/_components/landing/CutLanding.tsx
+++ b/site/src/app/cut/_components/landing/CutLanding.tsx
@@ -13,8 +13,8 @@ import { CutWorksWith } from "@/app/cut/_components/landing/CutWorksWith";
// with Cut-only content. `root` is "" on donkeycut.com and "/cut" in dev, so
// links into the app resolve on either host. Auth links are hidden: /sign-in
// does not exist on donkeycut.com — sign-in happens through the app's own
-// entry points — while the signed-in Dashboard pill (→ /app) lands on the Cut
-// projects home there.
+// entry points — while the signed-in "Go to App" pill points at the Cut
+// projects home on either host.
export function CutLanding({ root }: { root: string }) {
return (
<main
@@ -26,7 +26,12 @@ export function CutLanding({ root }: { root: string }) {
WebkitFontSmoothing: "antialiased",
}}
>
- <TopNav homeHref={root || "/"} wordmark="Donkey Cut" showAuthLinks={false} />
+ <TopNav
+ homeHref={root || "/"}
+ wordmark="Donkey Cut"
+ showAuthLinks={false}
+ signedInPill={{ href: `${root}/app`, label: "Go to App" }}
+ />
<CutHero root={root} />
<CutWorksWith />
<CutPricing root={root} />