fix(dashboard): remove Analytics, Marketing, Security, Integrations + fix build

- Deleted unused/stub routes: Security, Analytics, Marketing (+SEO/Social), Integrations
- Removed these routes from the Dashboard Sidebar menu
- Fixed Next.js build errors caused by duplicate component declarations (SectionHeader, KvRow) in overview, hosting, services, and infrastructure by relying fully on the unified dashboard-ui kit.
This commit is contained in:
2026-06-13 11:13:37 -07:00
parent eb198e2d4d
commit 9092b9e549
21 changed files with 2460 additions and 2927 deletions

View File

@@ -8,10 +8,7 @@ import {
LayoutGrid,
ClipboardList,
Database,
BarChart2,
Globe,
Plug,
ShieldCheck,
Code2,
Terminal,
Settings,
@@ -24,6 +21,15 @@ import {
import { useAnatomy } from "@/components/project/use-anatomy";
type MenuItem = {
segment: string;
label: string;
Icon: React.ElementType;
badge?: string;
hasChildren?: boolean;
children?: { segment: string; label: string }[];
};
export function DashboardSidebar({
workspace,
projectId,
@@ -61,7 +67,7 @@ export function DashboardSidebar({
}
};
const menuItems = [
const menuItems: MenuItem[] = [
{ segment: "overview", label: "Overview", Icon: LayoutGrid },
{ segment: "plan", label: "Plan & Specs", Icon: ClipboardList },
{ segment: "code", label: "Code", Icon: Code2 },
@@ -78,27 +84,8 @@ export function DashboardSidebar({
{ segment: "storage", label: "Storage", Icon: HardDrive },
{ segment: "services", label: "Services", Icon: Blocks },
{ segment: "users", label: "Auth / Users", Icon: Users },
{ segment: "integrations", label: "Integrations", Icon: Plug },
{ segment: "security", label: "Security", Icon: ShieldCheck },
{ segment: "logs", label: "Logs", Icon: Terminal },
{ segment: "domains", label: "Domains", Icon: Globe },
{
segment: "analytics",
label: "Analytics",
Icon: BarChart2,
badge: "Soon",
},
{
segment: "marketing",
label: "Marketing",
Icon: BarChart2,
badge: "New",
hasChildren: true,
children: [
{ segment: "marketing/seo", label: "SEO & GEO" },
{ segment: "marketing/social", label: "Social content" },
],
},
{
segment: "settings",
label: "Settings",
@@ -125,7 +112,7 @@ export function DashboardSidebar({
<div
style={{
width: 250,
borderRight: "1px solid #e4e4e7",
borderRight: "1px solid #e5e7eb",
background: "#ffffff",
display: "flex",
flexDirection: "column",
@@ -194,10 +181,10 @@ export function DashboardSidebar({
cursor: "pointer",
background:
isMainActive && !item.hasChildren
? "#eff6ff"
? "#f3f4f6"
: "transparent",
color:
isMainActive && !item.hasChildren ? "#1d4ed8" : "#52525b",
isMainActive && !item.hasChildren ? "#111827" : "#4b5563",
transition: "all 0.1s ease",
}}
onClick={() => {
@@ -248,8 +235,8 @@ export function DashboardSidebar({
{item.badge && (
<span
style={{
background: "#eef2ff",
color: "#4f46e5",
background: "#f3f4f6",
color: "#4b5563",
fontSize: "0.65rem",
fontWeight: 600,
padding: "2px 6px",
@@ -331,7 +318,8 @@ export function DashboardSidebar({
flex: 1,
minWidth: 0,
overflow: "auto",
background: "#fff",
background:
"radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #f9fafb 52%, #f3f4f6 100%)",
display: "flex",
flexDirection: "column",
}}