// Admin shell (SD-0001 §5.4) — the storefront's stable home; the home view is honestly // empty this release (PUC-8; PUC-9 sign-out). Renders from /me alone: storefront name + // signed-in email. No zeroed metric tiles, no locked-feature teasers (OHM: Agency & // Anti-Manipulation). Visuals per the ui/designs export (hf-admin). SD-0002 §5 adds the // admin nav strip + hash-routed products section (adminRouting.ts). import { useEffect, useState } from "react"; import { adminViewFor, type AdminView } from "../adminRouting"; import { logout } from "../api"; import { AccountChip, Banner, Eyebrow, Screen, TopBar } from "../ui/kit"; import ImportPreview from "./products/ImportPreview"; import ImportUpload from "./products/ImportUpload"; import ProductsPage from "./products/ProductsPage"; import RunDetail from "./products/RunDetail"; interface Props { storefrontName: string; email: string; welcome: "new" | "back" | null; onSignedOut: () => void; } export default function Admin({ storefrontName, email, welcome, onSignedOut }: Props) { const [view, setView] = useState(adminViewFor(window.location.hash)); useEffect(() => { const onHashChange = () => setView(adminViewFor(window.location.hash)); window.addEventListener("hashchange", onHashChange); return () => window.removeEventListener("hashchange", onHashChange); }, []); async function signOut() { await logout(); onSignedOut(); } return ( {storefrontName} ecomm storefront } right={} />
{view.view === "home" && (
{welcome && (
{welcome === "new" ? "A new account was created for this email." : "Signed in to your existing account."}
)} Your storefront

{storefrontName}

There's nothing to manage yet — and that's a finished state, not a missing one. Catalog, orders, and settings will appear here as ecomm grows.

)} {view.view === "products" && } {view.view === "import-upload" && } {view.view === "import-preview" && } {view.view === "run-detail" && }
); }