From 4bfadc4360ace9bed5a6edaa643b660f0c06fb06 Mon Sep 17 00:00:00 2001 From: marko-kraemer Date: Mon, 21 Apr 2025 05:49:18 +0100 Subject: [PATCH] rem /dashboard from routes --- .../(personalAccount)/loading.tsx | 0 .../(personalAccount)/settings/billing/page.tsx | 2 +- .../(personalAccount)/settings/layout.tsx | 6 +++--- .../(personalAccount)/settings/page.tsx | 0 .../(personalAccount)/settings/teams/page.tsx | 0 .../(teamAccount)/[accountSlug]/page.tsx | 2 +- .../(teamAccount)/[accountSlug]/settings/billing/page.tsx | 2 +- .../(teamAccount)/[accountSlug]/settings/layout.tsx | 6 +++--- .../(teamAccount)/[accountSlug]/settings/members/page.tsx | 0 .../(teamAccount)/[accountSlug]/settings/page.tsx | 0 .../{dashboard => (dashboard)}/agents/[threadId]/layout.tsx | 0 .../{dashboard => (dashboard)}/agents/[threadId]/page.tsx | 2 +- .../src/app/{dashboard => (dashboard)}/agents/layout.tsx | 0 frontend/src/app/{dashboard => (dashboard)}/agents/page.tsx | 6 +++--- frontend/src/app/{dashboard => (dashboard)}/layout.tsx | 0 frontend/src/app/{dashboard => (dashboard)}/page.tsx | 2 +- .../src/components/basejump/client-user-account-button.tsx | 4 ++-- frontend/src/components/basejump/manage-teams.tsx | 2 +- frontend/src/components/basejump/new-team-form.tsx | 2 +- frontend/src/components/basejump/user-account-button.tsx | 4 ++-- frontend/src/components/home/sections/hero-section.tsx | 2 +- frontend/src/components/sidebar/nav-agents.tsx | 2 +- frontend/src/components/sidebar/nav-user-with-teams.tsx | 6 +++--- frontend/src/lib/actions/invitations.ts | 4 ++-- frontend/src/lib/actions/teams.ts | 4 ++-- 25 files changed, 29 insertions(+), 29 deletions(-) rename frontend/src/app/{dashboard => (dashboard)}/(personalAccount)/loading.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/(personalAccount)/settings/billing/page.tsx (88%) rename frontend/src/app/{dashboard => (dashboard)}/(personalAccount)/settings/layout.tsx (89%) rename frontend/src/app/{dashboard => (dashboard)}/(personalAccount)/settings/page.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/(personalAccount)/settings/teams/page.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/(teamAccount)/[accountSlug]/page.tsx (87%) rename frontend/src/app/{dashboard => (dashboard)}/(teamAccount)/[accountSlug]/settings/billing/page.tsx (96%) rename frontend/src/app/{dashboard => (dashboard)}/(teamAccount)/[accountSlug]/settings/layout.tsx (88%) rename frontend/src/app/{dashboard => (dashboard)}/(teamAccount)/[accountSlug]/settings/members/page.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/(teamAccount)/[accountSlug]/settings/page.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/agents/[threadId]/layout.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/agents/[threadId]/page.tsx (99%) rename frontend/src/app/{dashboard => (dashboard)}/agents/layout.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/agents/page.tsx (96%) rename frontend/src/app/{dashboard => (dashboard)}/layout.tsx (100%) rename frontend/src/app/{dashboard => (dashboard)}/page.tsx (98%) diff --git a/frontend/src/app/dashboard/(personalAccount)/loading.tsx b/frontend/src/app/(dashboard)/(personalAccount)/loading.tsx similarity index 100% rename from frontend/src/app/dashboard/(personalAccount)/loading.tsx rename to frontend/src/app/(dashboard)/(personalAccount)/loading.tsx diff --git a/frontend/src/app/dashboard/(personalAccount)/settings/billing/page.tsx b/frontend/src/app/(dashboard)/(personalAccount)/settings/billing/page.tsx similarity index 88% rename from frontend/src/app/dashboard/(personalAccount)/settings/billing/page.tsx rename to frontend/src/app/(dashboard)/(personalAccount)/settings/billing/page.tsx index ba868001..3647ff79 100644 --- a/frontend/src/app/dashboard/(personalAccount)/settings/billing/page.tsx +++ b/frontend/src/app/(dashboard)/(personalAccount)/settings/billing/page.tsx @@ -10,7 +10,7 @@ export default async function PersonalAccountBillingPage() { return (
- +
) } \ No newline at end of file diff --git a/frontend/src/app/dashboard/(personalAccount)/settings/layout.tsx b/frontend/src/app/(dashboard)/(personalAccount)/settings/layout.tsx similarity index 89% rename from frontend/src/app/dashboard/(personalAccount)/settings/layout.tsx rename to frontend/src/app/(dashboard)/(personalAccount)/settings/layout.tsx index a35658e6..aa7a8aa3 100644 --- a/frontend/src/app/dashboard/(personalAccount)/settings/layout.tsx +++ b/frontend/src/app/(dashboard)/(personalAccount)/settings/layout.tsx @@ -7,9 +7,9 @@ import { usePathname } from "next/navigation"; export default function PersonalAccountSettingsPage({children}: {children: React.ReactNode}) { const pathname = usePathname(); const items = [ - { name: "Profile", href: "/dashboard/settings" }, - { name: "Teams", href: "/dashboard/settings/teams" }, - { name: "Billing", href: "/dashboard/settings/billing" }, + { name: "Profile", href: "/settings" }, + { name: "Teams", href: "/settings/teams" }, + { name: "Billing", href: "/settings/billing" }, ] return (
diff --git a/frontend/src/app/dashboard/(personalAccount)/settings/page.tsx b/frontend/src/app/(dashboard)/(personalAccount)/settings/page.tsx similarity index 100% rename from frontend/src/app/dashboard/(personalAccount)/settings/page.tsx rename to frontend/src/app/(dashboard)/(personalAccount)/settings/page.tsx diff --git a/frontend/src/app/dashboard/(personalAccount)/settings/teams/page.tsx b/frontend/src/app/(dashboard)/(personalAccount)/settings/teams/page.tsx similarity index 100% rename from frontend/src/app/dashboard/(personalAccount)/settings/teams/page.tsx rename to frontend/src/app/(dashboard)/(personalAccount)/settings/teams/page.tsx diff --git a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/page.tsx b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/page.tsx similarity index 87% rename from frontend/src/app/dashboard/(teamAccount)/[accountSlug]/page.tsx rename to frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/page.tsx index d012038f..4eb14799 100644 --- a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/page.tsx +++ b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/page.tsx @@ -16,5 +16,5 @@ export default function AccountRedirect({ const { accountSlug } = unwrappedParams; // Redirect to the settings page - redirect(`/dashboard/${accountSlug}/settings`); + redirect(`/${accountSlug}/settings`); } \ No newline at end of file diff --git a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/billing/page.tsx b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/billing/page.tsx similarity index 96% rename from frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/billing/page.tsx rename to frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/billing/page.tsx index 2d5b64d2..626eea75 100644 --- a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/billing/page.tsx +++ b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/billing/page.tsx @@ -69,7 +69,7 @@ export default function TeamBillingPage({ params }: { params: Promise
) diff --git a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/layout.tsx b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/layout.tsx similarity index 88% rename from frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/layout.tsx rename to frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/layout.tsx index a6aa8d2a..289ae2a1 100644 --- a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/layout.tsx +++ b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/layout.tsx @@ -20,9 +20,9 @@ export default function TeamSettingsLayout({ const { accountSlug } = unwrappedParams; const pathname = usePathname(); const items = [ - { name: "Account", href: `/dashboard/${accountSlug}/settings` }, - { name: "Members", href: `/dashboard/${accountSlug}/settings/members` }, - { name: "Billing", href: `/dashboard/${accountSlug}/settings/billing` }, + { name: "Account", href: `/${accountSlug}/settings` }, + { name: "Members", href: `/${accountSlug}/settings/members` }, + { name: "Billing", href: `/${accountSlug}/settings/billing` }, ] return (
diff --git a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/members/page.tsx b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/members/page.tsx similarity index 100% rename from frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/members/page.tsx rename to frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/members/page.tsx diff --git a/frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/page.tsx b/frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/page.tsx similarity index 100% rename from frontend/src/app/dashboard/(teamAccount)/[accountSlug]/settings/page.tsx rename to frontend/src/app/(dashboard)/(teamAccount)/[accountSlug]/settings/page.tsx diff --git a/frontend/src/app/dashboard/agents/[threadId]/layout.tsx b/frontend/src/app/(dashboard)/agents/[threadId]/layout.tsx similarity index 100% rename from frontend/src/app/dashboard/agents/[threadId]/layout.tsx rename to frontend/src/app/(dashboard)/agents/[threadId]/layout.tsx diff --git a/frontend/src/app/dashboard/agents/[threadId]/page.tsx b/frontend/src/app/(dashboard)/agents/[threadId]/page.tsx similarity index 99% rename from frontend/src/app/dashboard/agents/[threadId]/page.tsx rename to frontend/src/app/(dashboard)/agents/[threadId]/page.tsx index fd3ee938..8260e2d3 100644 --- a/frontend/src/app/dashboard/agents/[threadId]/page.tsx +++ b/frontend/src/app/(dashboard)/agents/[threadId]/page.tsx @@ -1110,7 +1110,7 @@ export default function ThreadPage({ params }: { params: Promise }

Error

{error}

-
diff --git a/frontend/src/app/dashboard/agents/layout.tsx b/frontend/src/app/(dashboard)/agents/layout.tsx similarity index 100% rename from frontend/src/app/dashboard/agents/layout.tsx rename to frontend/src/app/(dashboard)/agents/layout.tsx diff --git a/frontend/src/app/dashboard/agents/page.tsx b/frontend/src/app/(dashboard)/agents/page.tsx similarity index 96% rename from frontend/src/app/dashboard/agents/page.tsx rename to frontend/src/app/(dashboard)/agents/page.tsx index 68a8635d..cee0ba35 100644 --- a/frontend/src/app/dashboard/agents/page.tsx +++ b/frontend/src/app/(dashboard)/agents/page.tsx @@ -80,7 +80,7 @@ export default function AgentsPage() {

diff --git a/frontend/src/components/basejump/new-team-form.tsx b/frontend/src/components/basejump/new-team-form.tsx index cb8bb7ca..9e63017b 100644 --- a/frontend/src/components/basejump/new-team-form.tsx +++ b/frontend/src/components/basejump/new-team-form.tsx @@ -79,7 +79,7 @@ export default function NewTeamForm() {

This will be used for your team URL: - yourapp.com/dashboard/{slugValue || "team-name"} + yourapp.com/{slugValue || "team-name"}

diff --git a/frontend/src/components/basejump/user-account-button.tsx b/frontend/src/components/basejump/user-account-button.tsx index 2949ce44..a1c3a52d 100644 --- a/frontend/src/components/basejump/user-account-button.tsx +++ b/frontend/src/components/basejump/user-account-button.tsx @@ -47,10 +47,10 @@ export default async function UserAccountButton() { My Account - Settings + Settings - Teams + Teams diff --git a/frontend/src/components/home/sections/hero-section.tsx b/frontend/src/components/home/sections/hero-section.tsx index eb25bc60..133b263d 100644 --- a/frontend/src/components/home/sections/hero-section.tsx +++ b/frontend/src/components/home/sections/hero-section.tsx @@ -118,7 +118,7 @@ export function HeroSection() { }); // 5. Navigate to the new agent's thread page - router.push(`/dashboard/agents/${thread.thread_id}`); + router.push(`/agents/${thread.thread_id}`); } catch (error) { console.error("Error creating agent:", error); setIsSubmitting(false); diff --git a/frontend/src/components/sidebar/nav-agents.tsx b/frontend/src/components/sidebar/nav-agents.tsx index ebe742f7..727e6157 100644 --- a/frontend/src/components/sidebar/nav-agents.tsx +++ b/frontend/src/components/sidebar/nav-agents.tsx @@ -104,7 +104,7 @@ export function NavAgents() { threadId: thread.thread_id, projectId: projectId, projectName: project.name || 'Unnamed Project', - url: `/dashboard/agents/${thread.thread_id}`, + url: `/agents/${thread.thread_id}`, updatedAt: thread.updated_at || project.updated_at || new Date().toISOString() }); } diff --git a/frontend/src/components/sidebar/nav-user-with-teams.tsx b/frontend/src/components/sidebar/nav-user-with-teams.tsx index 9463f004..06388e26 100644 --- a/frontend/src/components/sidebar/nav-user-with-teams.tsx +++ b/frontend/src/components/sidebar/nav-user-with-teams.tsx @@ -131,7 +131,7 @@ export function NavUserWithTeams({ if (team.personal_account) { router.push('/dashboard') } else { - router.push(`/dashboard/${team.slug}`) + router.push(`/${team.slug}`) } } @@ -268,13 +268,13 @@ export function NavUserWithTeams({ {/* User Settings Section */} - + Billing - + Settings diff --git a/frontend/src/lib/actions/invitations.ts b/frontend/src/lib/actions/invitations.ts index 60730e43..473063f0 100644 --- a/frontend/src/lib/actions/invitations.ts +++ b/frontend/src/lib/actions/invitations.ts @@ -25,7 +25,7 @@ export async function createInvitation(prevState: any, formData: FormData): Prom }; } - revalidatePath(`/dashboard/[accountSlug]/settings/members/page`); + revalidatePath(`/[accountSlug]/settings/members/page`); return { token: data.token as string @@ -69,6 +69,6 @@ export async function acceptInvitation(prevState: any, formData: FormData) { message: error.message }; } - redirect(`/dashboard/${data.slug}`); + redirect(`/${data.slug}`); }; \ No newline at end of file diff --git a/frontend/src/lib/actions/teams.ts b/frontend/src/lib/actions/teams.ts index 48416966..c54a3c6b 100644 --- a/frontend/src/lib/actions/teams.ts +++ b/frontend/src/lib/actions/teams.ts @@ -21,7 +21,7 @@ export async function createTeam(prevState: any, formData: FormData) { }; } - redirect(`/dashboard/${data.slug}`); + redirect(`/${data.slug}`); }; @@ -62,5 +62,5 @@ export async function editTeamSlug(prevState: any, formData: FormData) { }; } - redirect(`/dashboard/${data.slug}/settings`); + redirect(`/${data.slug}/settings`); }; \ No newline at end of file