/** * Governance Page * Main governance dashboard with tabs for City, Audit, Incidents */ import React, { useState } from 'react'; import { useSearchParams } from 'react-router-dom'; import { CityGovernancePanel } from '../features/governance/components/CityGovernancePanel'; import { AuditDashboard } from '../features/governance/components/AuditDashboard'; import { IncidentsList } from '../features/governance/components/IncidentsList'; type Tab = 'city' | 'audit' | 'incidents'; export function GovernancePage() { const [searchParams, setSearchParams] = useSearchParams(); const initialTab = (searchParams.get('tab') as Tab) || 'city'; const [activeTab, setActiveTab] = useState(initialTab); const handleTabChange = (tab: Tab) => { setActiveTab(tab); setSearchParams({ tab }); }; // TODO: Get actual actorDaisId from auth context const actorDaisId = 'dais-demo-user'; return (
{/* Header */}

🏛️ DAARION.city Governance

Управління агентами, ролями, інцидентами та аудит подій

{/* Tabs */}
handleTabChange('city')} icon="🏛️" label="City Governance" /> handleTabChange('audit')} icon="📊" label="Audit" /> handleTabChange('incidents')} icon="⚠️" label="Incidents" />
{/* Content */}
{activeTab === 'city' && ( )} {activeTab === 'audit' && ( )} {activeTab === 'incidents' && ( )}
); } // Tab Button Component function TabButton({ active, onClick, icon, label }: { active: boolean; onClick: () => void; icon: string; label: string; }) { return ( ); } export default GovernancePage;