// MyAirSpace — Account dashboard. List of the resident's certificates. const { Button, Card, Badge, Seal } = window.MyAirSpace || {}; const Icon = window.MyAirSpaceIcon; function useVP() { const g = () => (typeof window === "undefined" ? 1180 : window.innerWidth); const [w, setW] = React.useState(g); React.useEffect(() => { const o = () => setW(g()); window.addEventListener("resize", o); return () => window.removeEventListener("resize", o); }, []); return w; } const CERTS = [ { id: "MAS-4F2K-8WMT", addr: "14 Rodwell Avenue, Weymouth", postcode: "DT4 8QT", issued: "18 Jun 2026", expires: "18 Jun 2027", status: "active" }, { id: "MAS-2B8P-3ESP", addr: "Flat 5, 8 The Esplanade, Weymouth", postcode: "DT4 7AA", issued: "02 Mar 2026", expires: "02 Mar 2027", status: "active" }, { id: "MAS-9XQ1-7PRT", addr: "3 Portland Road, Weymouth", postcode: "DT5 1AH", issued: "11 Jun 2025", expires: "11 Jun 2026", status: "expired" }, ]; function Sidebar({ active = "certificates", mobile }) { const items = [ ["certificates", "file-text", "My certificates", "index.html"], ["account", "user", "Account details", "details.html"], ["billing", "credit-card", "Billing & receipts", "billing.html"], ["help", "life-buoy", "Help & support", "help.html"], ]; const links = items.map(([key, icon, label, href]) => { const on = key === active; return ( {label} ); }); if (mobile) { return ( ); } return ( ); } function Topbar({ mobile }) { return (
Account

My certificates

EH
); } function StatCard({ icon, value, label, tone }) { return (
{icon}
{value}
{label}
); } function CertRow({ c }) { const active = c.status === "active"; return (
{c.addr} {active ? Active : Expired}
{c.id}Issued {c.issued}{active ? `Valid to ${c.expires}` : `Expired ${c.expires}`}
{active ? ( ) : ( )}
); } function Dashboard() { const mobile = useVP() < 900; return (
} value="2" label="Active certificates" tone="var(--success-soft)" /> } value="1" label="Due for renewal" tone="var(--warning-soft)" /> } value="3" label="Properties on record" tone="var(--accent-soft)" />

All certificates

Filter
{CERTS.map((c) => )}
); } window.Dashboard = Dashboard;