refactor(web): move changelog out of settings into its own route
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Product changelog isn't an account setting. Give it a dedicated /dashboard/changelog route and a "What's New" sidebar link (Support section), and drop the changelog tab from settings. The header page title now resolves support-section routes too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import { Link, Outlet, createFileRoute, useNavigate, useRouterState } from "@tan
|
||||
import {
|
||||
BarChart3,
|
||||
BookOpen,
|
||||
CalendarDays,
|
||||
ChevronsUpDown,
|
||||
Copy,
|
||||
CreditCard,
|
||||
@@ -81,6 +82,7 @@ const accountItems: readonly NavItem[] = [
|
||||
];
|
||||
|
||||
const supportItems: readonly NavItem[] = [
|
||||
{ to: "/dashboard/changelog", labelKey: "nav.changelog", icon: CalendarDays },
|
||||
{ to: "/contact", labelKey: "nav.contact", icon: Mail },
|
||||
{ to: "/blog", labelKey: "nav.blog", icon: BookOpen },
|
||||
];
|
||||
@@ -240,7 +242,7 @@ function DashboardLayout() {
|
||||
const userEmail = user.email;
|
||||
|
||||
// Current page title for the header — longest matching nav `to` wins.
|
||||
const allNavItems = [...mainMenuItems, ...accountItems, ...adminItems];
|
||||
const allNavItems = [...mainMenuItems, ...accountItems, ...supportItems, ...adminItems];
|
||||
const currentItem = allNavItems
|
||||
.filter((i) =>
|
||||
i.exact ? pathname === i.to : pathname === i.to || pathname.startsWith(`${i.to}/`),
|
||||
|
||||
14
apps/web/src/routes/dashboard/changelog.tsx
Normal file
14
apps/web/src/routes/dashboard/changelog.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ChangelogTab } from "@/components/settings/changelog-tab";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/dashboard/changelog")({
|
||||
component: ChangelogPage,
|
||||
});
|
||||
|
||||
function ChangelogPage() {
|
||||
return (
|
||||
<div className="mx-auto max-w-3xl">
|
||||
<ChangelogTab />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -15,7 +15,6 @@ export const SETTINGS_TABS = [
|
||||
"connections",
|
||||
"referral",
|
||||
"account",
|
||||
"changelog",
|
||||
] as const;
|
||||
export type SettingsTab = (typeof SETTINGS_TABS)[number];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user