import { useState } from "react" import { useLocation } from "react-router-dom" import Sidebar from "./Sidebar" const PAGE_COPY = { "/": { label: "Command Center", subtitle: "Real-time manufacturing quality monitoring, reporting, and plant visibility.", }, "/live": { label: "Live Monitoring", subtitle: "Choose uploaded images or browser camera feed for inspection and monitoring.", }, "/history": { label: "Inspection History", subtitle: "Trace reports, decisions, and defect signatures over time.", }, "/analytics": { label: "Analytics", subtitle: "Trend performance, defect mix, and production quality signals.", }, } function formatHeaderTime() { return new Intl.DateTimeFormat("en-IN", { weekday: "short", month: "short", day: "numeric", hour: "numeric", minute: "2-digit", }).format(new Date()) } export default function AppShell({ children }) { const { pathname } = useLocation() const [mobileOpen, setMobileOpen] = useState(false) const headerCopy = PAGE_COPY[pathname] || PAGE_COPY["/"] return (
Manufacturing Monitoring System
{headerCopy.subtitle}