-
+
Get started →
@@ -116,8 +111,8 @@ export default async function LandingPage() {
}) {
const { token } = use(params);
@@ -30,7 +31,7 @@ export default function ResetPasswordPage({ params }: { params: Promise<{ token:
const data = await res.json();
if (!res.ok) { setError(data.error ?? "Reset failed."); return; }
setDone(true);
- setTimeout(() => router.push("/sign-in"), 2000);
+ setTimeout(() => router.push(ROUTES.SIGN_IN), 2000);
} catch {
setError("Something went wrong. Please try again.");
} finally {
@@ -94,7 +95,7 @@ export default function ResetPasswordPage({ params }: { params: Promise<{ token:
Link expired?{" "}
-
+
Request a new one
diff --git a/src/app/setup/page.tsx b/src/app/setup/page.tsx
index 5bd65fc1e..cb7e6096f 100644
--- a/src/app/setup/page.tsx
+++ b/src/app/setup/page.tsx
@@ -4,6 +4,7 @@ import { useState } from "react";
import { useRouter } from "next/navigation";
import Link from "next/link";
import { postJson } from "@/lib/api/fetch";
+import { ROUTES } from "@/config/auth";
import {
AuthShell, AuthCard, AuthField, AuthInput, AuthSubmitButton, AuthIconBadge, AuthHeading,
} from "@/components/auth/AuthShell";
@@ -27,7 +28,7 @@ export default function SetupPage() {
const res = await postJson("/api/setup", { name, password });
const data = await res.json();
if (!res.ok) { setError(data.error ?? "Setup failed."); return; }
- router.push("/sign-in");
+ router.push(ROUTES.SIGN_IN);
} catch {
setError("Something went wrong.");
} finally {
@@ -91,7 +92,7 @@ export default function SetupPage() {
Already have an account?{" "}
-
+
Sign in
diff --git a/src/app/sign-up/page.tsx b/src/app/sign-up/page.tsx
index f19050187..51bc7afe0 100644
--- a/src/app/sign-up/page.tsx
+++ b/src/app/sign-up/page.tsx
@@ -8,6 +8,7 @@ import {
AuthFooterLink, AuthHeading,
} from "@/components/auth/AuthShell";
import { postJson } from "@/lib/api/fetch";
+import { ROUTES } from "@/config/auth";
export default function SignUpPage() {
const router = useRouter();
@@ -32,9 +33,9 @@ export default function SignUpPage() {
const result = await signIn("email-password", { email, password, redirect: false });
if (result?.ok) {
- router.push("/onboarding");
+ router.push(ROUTES.ONBOARDING);
} else {
- router.push("/sign-in");
+ router.push(ROUTES.SIGN_IN);
}
} catch {
setError("Something went wrong. Please try again.");
@@ -107,7 +108,7 @@ export default function SignUpPage() {
-
+
Already have an account? Sign in →
diff --git a/src/app/verify-email/page.tsx b/src/app/verify-email/page.tsx
index d23e45bca..150431f88 100644
--- a/src/app/verify-email/page.tsx
+++ b/src/app/verify-email/page.tsx
@@ -8,6 +8,7 @@ import {
AuthFooterLink, AuthHeading,
} from "@/components/auth/AuthShell";
import { postJson } from "@/lib/api/fetch";
+import { ROUTES } from "@/config/auth";
function VerifyEmailInner() {
const params = useSearchParams();
@@ -80,7 +81,7 @@ function VerifyEmailInner() {
)}
- ← Back to sign in
+ ← Back to sign in
);
}
@@ -122,7 +123,7 @@ function VerifyEmailInner() {
)}
- ← Back to sign in
+ ← Back to sign in
);
}
diff --git a/src/app/whitepaper/page.tsx b/src/app/whitepaper/page.tsx
index 21d2310c0..794200a53 100644
--- a/src/app/whitepaper/page.tsx
+++ b/src/app/whitepaper/page.tsx
@@ -4,6 +4,7 @@ import Link from "next/link";
import type { Metadata } from "next";
import { PublicSurface } from "@/components/public/PublicSurface";
import { parseThoughtBlocks } from "@/lib/thoughts-content";
+import { ROUTES } from "@/config/auth";
export const metadata: Metadata = {
title: "Whitepaper — Cockpit",
@@ -44,7 +45,7 @@ export default function WhitepaperPage() {
return (
+
Get started →
)}
@@ -147,7 +148,7 @@ export default function WhitepaperPage() {
Ready to close the execution gap?
Start using Cockpit as your builder operating system.
-
+
Get started →
diff --git a/src/components/auth/AuthShell.tsx b/src/components/auth/AuthShell.tsx
index d9677b64e..b99fe4cd0 100644
--- a/src/components/auth/AuthShell.tsx
+++ b/src/components/auth/AuthShell.tsx
@@ -1,12 +1,7 @@
import Link from "next/link";
-import { PublicSurface, type NavLink } from "@/components/public/PublicSurface";
+import { PublicSurface } from "@/components/public/PublicSurface";
import { PUBLIC_SURFACE } from "@/config/ui";
-
-const AUTH_NAV_LINKS: NavLink[] = [
- { label: "Features", href: "/#features" },
- { label: "Pricing", href: "/#pricing" },
- { label: "Whitepaper", href: "/whitepaper" },
-];
+import { PUBLIC_NAV_LINKS } from "@/config/auth";
export function AuthField({
label,
@@ -92,7 +87,7 @@ export function AuthShell({
navRight?: React.ReactNode;
}) {
return (
-
+
("email");
const [email, setEmail] = useState("");
@@ -200,7 +201,7 @@ function FormInner({
/>
Forgot password?
@@ -217,7 +218,7 @@ function FormInner({
/>
No account?{" "}
-
+
Create one free →
diff --git a/src/components/shell/sidebar/SidebarFooter.tsx b/src/components/shell/sidebar/SidebarFooter.tsx
index 710713c21..4430caf94 100644
--- a/src/components/shell/sidebar/SidebarFooter.tsx
+++ b/src/components/shell/sidebar/SidebarFooter.tsx
@@ -5,6 +5,7 @@ import { signOut } from "next-auth/react";
import { ThemeToggle } from "../ThemeToggle";
import { cn } from "@/lib/utils";
import { usePrivateZone } from "@/hooks/use-private-zone";
+import { ROUTES } from "@/config/auth";
export function SidebarFooter({
collapsed,
@@ -43,7 +44,7 @@ export function SidebarFooter({
)}