/* App shell — sidebar + topbar */ const { useState } = React; function Wordmark({ size = 18 }) { return ( Growth Engine PH ); } function Sidebar({ route, onRoute, channel, onChannel, viewMode }) { const navSections = [ { label: '01 — Agency', items: [ { id: 'portfolio', icon: 'grid', name: 'Portfolio', count: '8' }, ], hideForClient: true }, { label: '02 — Client workspace', items: [ { id: 'overview', icon: 'home', name: 'Overview' }, { id: 'rankings', icon: 'target', name: 'Keyword rankings', count: '142' }, { id: 'gsc', icon: 'search', name: 'Search performance' }, { id: 'ga4', icon: 'line', name: 'Traffic & engagement' }, { id: 'backlinks',icon: 'link', name: 'Backlinks' }, ]}, { label: '03 — Setup', items: [ { id: 'settings', icon: 'plug', name: 'Integrations' }, ]}, ]; return ( ); } function Topbar({ route, client, onPickClient, range, setRange, compare, setCompare, viewMode, theme, onToggleTheme }) { const crumbs = { portfolio: ['Agency', 'Portfolio'], overview: [client?.name, 'SEO overview'], rankings: [client?.name, 'Keyword rankings'], gsc: [client?.name, 'Search Console'], ga4: [client?.name, 'Traffic & engagement'], backlinks: [client?.name, 'Backlinks'], settings: [client?.name || 'Workspace', 'Integrations'], }[route] || ['Dashboard']; return (
{crumbs.map((c, i) => ( {i > 0 && /} {c} ))}
{route !== 'portfolio' && client && ( )} {route !== 'portfolio' && ( )}
); } window.Sidebar = Sidebar; window.Topbar = Topbar; window.Wordmark = Wordmark;