"use client"; import { Suspense } from "react"; import { useParams, useSearchParams, useRouter } from "next/navigation"; const SECTIONS = [ { id: "customers", label: "Customers", icon: "◉", title: "Customer List", desc: "Every user who has signed up, their plan, usage, last seen, and lifecycle stage. Filter, search, and act on any segment.", items: ["User Directory", "Lifecycle Stages", "Plan & Billing", "Activity Timeline", "Segment Builder"], }, { id: "usage", label: "Usage", icon: "∿", title: "Usage & Activity", desc: "How users interact with your product — feature adoption, session frequency, retention curves, and activation funnels.", items: ["Feature Adoption", "Session Metrics", "Retention Curves", "Activation Funnel", "Power Users"], }, { id: "events", label: "Events", icon: "◬", title: "Events & Tracking", desc: "Every event your product fires — page views, clicks, conversions, and custom events — all tagged and queryable.", items: ["Event Stream", "Custom Events", "Page Views", "Conversion Events", "Tag Manager"], }, { id: "reports", label: "Reports", icon: "▭", title: "Reports", desc: "MRR, churn, DAU/MAU, cohort analysis, and revenue reports. Export or share with your team on a schedule.", items: ["Revenue (MRR/ARR)", "Churn Report", "DAU / MAU", "Cohort Analysis", "Custom Reports", "Scheduled Exports"], }, ] as const; type SectionId = typeof SECTIONS[number]["id"]; const NAV_GROUP: React.CSSProperties = { fontSize: "0.6rem", fontWeight: 700, color: "#b5b0a6", letterSpacing: "0.09em", textTransform: "uppercase", padding: "14px 12px 6px", fontFamily: "var(--font-inter), ui-sans-serif, sans-serif", }; function AnalyticsInner() { const params = useParams(); const searchParams = useSearchParams(); const router = useRouter(); const workspace = params.workspace as string; const projectId = params.projectId as string; const activeId = (searchParams.get("section") ?? "customers") as SectionId; const active = SECTIONS.find(s => s.id === activeId) ?? SECTIONS[0]; const setSection = (id: string) => router.push(`/${workspace}/project/${projectId}/analytics?section=${id}`, { scroll: false }); return (
{/* Left nav */}
Analytics
{SECTIONS.map(s => { const isActive = activeId === s.id; return ( ); })}
{/* Content */}
{active.title}
{active.desc}
{active.items.map(item => (
{item} Soon
))}
{active.title} is coming to VIBN
We're building this section next. Shape it by telling us what you need.
); } export default function AnalyticsPage() { return ( Loading…}> ); }