import React, { useMemo, useState } from "react"; import { motion } from "framer-motion"; import { BarChart3, CalendarDays, CreditCard, LayoutDashboard, Search, Settings, Users, Bell, Plus, CheckCircle2, Clock3, FileText, ArrowUpRight, Sparkles, Menu, } from "lucide-react"; import { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis, } from "recharts"; const stats = [ { label: "Active Clients", value: "18", change: "+12%", icon: Users }, { label: "Scheduled Posts", value: "74", change: "+28%", icon: CalendarDays }, { label: "Engagement Rate", value: "8.4%", change: "+3.1%", icon: BarChart3 }, { label: "Plan Usage", value: "68%", change: "Pro Plan", icon: CreditCard }, ]; const clients = [ { name: "BlueView Cafe", status: "Active", campaigns: 6, last: "Today" }, { name: "Gaty Wear", status: "Active", campaigns: 11, last: "Yesterday" }, { name: "Shutter Wave", status: "Review", campaigns: 4, last: "2 days ago" }, { name: "FitCore Meals", status: "Paused", campaigns: 2, last: "Last week" }, ]; const posts = [ { title: "Ramadan offer reel", client: "BlueView Cafe", time: "10:30 AM", status: "Scheduled" }, { title: "New collection carousel", client: "Gaty Wear", time: "01:00 PM", status: "Draft" }, { title: "Agency proof post", client: "Shutter Wave", time: "06:45 PM", status: "Published" }, ]; const chartData = [ { day: "Sat", posts: 8, engagement: 32 }, { day: "Sun", posts: 10, engagement: 44 }, { day: "Mon", posts: 7, engagement: 39 }, { day: "Tue", posts: 14, engagement: 58 }, { day: "Wed", posts: 11, engagement: 51 }, { day: "Thu", posts: 16, engagement: 68 }, { day: "Fri", posts: 9, engagement: 42 }, ]; const nav = [ { id: "overview", label: "Overview", icon: LayoutDashboard }, { id: "clients", label: "Clients", icon: Users }, { id: "calendar", label: "Calendar", icon: CalendarDays }, { id: "billing", label: "Billing", icon: CreditCard }, { id: "settings", label: "Settings", icon: Settings }, ]; function Badge({ children, tone = "default" }) { const styles = { default: "bg-slate-100 text-slate-700", green: "bg-emerald-100 text-emerald-700", amber: "bg-amber-100 text-amber-700", red: "bg-rose-100 text-rose-700", blue: "bg-blue-100 text-blue-700", }; return {children}; } function Card({ children, className = "" }) { return
{children}
; } export default function ContentFlowDashboard() { const [active, setActive] = useState("overview"); const [sidebarOpen, setSidebarOpen] = useState(false); const activeTitle = useMemo(() => nav.find((item) => item.id === active)?.label || "Overview", [active]); const renderMain = () => { if (active === "clients") return ; if (active === "calendar") return ; if (active === "billing") return ; if (active === "settings") return ; return ; }; return (
{sidebarOpen &&
setSidebarOpen(false)} />}

{activeTitle}

Manage clients, posts, billing, and workspace activity.

{renderMain()}
); } function OverviewSection() { return (
{stats.map((stat) => { const Icon = stat.icon; return (
{stat.change}

{stat.label}

{stat.value}

); })}

Weekly Performance

Posts and engagement overview

Live Demo

Today’s Queue

{posts.map((post) => (

{post.title}

{post.client}

{post.time} {post.status}
))}
); } function ClientsSection() { return (

Clients

Simple SaaS table with statuses and campaigns.

{clients.map((client) => ( ))}
Client Status Campaigns Last Activity
{client.name} {client.status} {client.campaigns} {client.last}
); } function CalendarSection() { return (
{posts.map((post) => (

{post.title}

{post.client} • {post.time}

{post.status}
))}
); } function BillingSection() { return (

Current Plan

You are using the Pro workspace plan.

Pro Plan

$29/mo

Usage

{["AI captions", "Scheduled posts", "Client seats"].map((item, index) => (
{item} {[68, 42, 80][index]}%
))}
); } function SettingsSection() { return (

Workspace Settings

Demo mode enabled

No backend, database, or payment integration attached.

); }