diff --git a/src/app/(dashboard)/accounts/page.tsx b/src/app/(dashboard)/accounts/page.tsx index 2b52563..934ae0a 100644 --- a/src/app/(dashboard)/accounts/page.tsx +++ b/src/app/(dashboard)/accounts/page.tsx @@ -659,7 +659,7 @@ export default function AccountExplorer() { return (
- + {/* KPI Summary Cards */}
diff --git a/src/app/(dashboard)/activity/page.tsx b/src/app/(dashboard)/activity/page.tsx index 32277e1..765ede5 100644 --- a/src/app/(dashboard)/activity/page.tsx +++ b/src/app/(dashboard)/activity/page.tsx @@ -174,7 +174,7 @@ export default function ActivityDeepDive() { return (
- + {/* Type filter chips */}
diff --git a/src/app/(dashboard)/goals/page.tsx b/src/app/(dashboard)/goals/page.tsx index 06da55e..63530f7 100644 --- a/src/app/(dashboard)/goals/page.tsx +++ b/src/app/(dashboard)/goals/page.tsx @@ -120,7 +120,7 @@ export default function GoalsPage() { return (
- +
diff --git a/src/app/(dashboard)/implementation/page.tsx b/src/app/(dashboard)/implementation/page.tsx index e56e0fd..9227ab0 100644 --- a/src/app/(dashboard)/implementation/page.tsx +++ b/src/app/(dashboard)/implementation/page.tsx @@ -62,7 +62,7 @@ export default function ImplementationOutcomes() { return (
- + {/* Health Summary */}
diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx index add27fe..70068f6 100644 --- a/src/app/(dashboard)/page.tsx +++ b/src/app/(dashboard)/page.tsx @@ -113,7 +113,7 @@ export default function ExecutiveOverview() { return (
- +
diff --git a/src/app/(dashboard)/pipeline/page.tsx b/src/app/(dashboard)/pipeline/page.tsx index 57b9c4a..543ef3e 100644 --- a/src/app/(dashboard)/pipeline/page.tsx +++ b/src/app/(dashboard)/pipeline/page.tsx @@ -180,7 +180,7 @@ export default function PipelineDeepDive() { return (
- +
diff --git a/src/app/(dashboard)/playbooks/page.tsx b/src/app/(dashboard)/playbooks/page.tsx index b0f658e..4432980 100644 --- a/src/app/(dashboard)/playbooks/page.tsx +++ b/src/app/(dashboard)/playbooks/page.tsx @@ -132,7 +132,7 @@ export default function PlaybooksPage() { Back - +
{editing ? ( @@ -221,7 +221,7 @@ export default function PlaybooksPage() { return (
- +
{playbooks.map(pb => { diff --git a/src/components/layout/TopBar.tsx b/src/components/layout/TopBar.tsx index 7768238..802f33b 100644 --- a/src/components/layout/TopBar.tsx +++ b/src/components/layout/TopBar.tsx @@ -16,7 +16,7 @@ const DATE_PRESETS: { value: DatePreset; label: string }[] = [ export function TopBar() { const { filters, setDistricts, setDatePreset, refresh, isLoading, lastRefreshed, clearAllFilters, clearCrossFilter } = useData(); - const { title, subtitle } = usePageTitle(); + const { title } = usePageTitle(); const [showDistrictDropdown, setShowDistrictDropdown] = useState(false); const dropdownRef = useRef(null); @@ -56,10 +56,7 @@ export function TopBar() { {/* Page title */}
{title && ( - <> -

{title}

- {subtitle && — {subtitle}} - +

{title}

)}
diff --git a/src/components/ui/PageHeader.tsx b/src/components/ui/PageHeader.tsx index 425d458..d21ea11 100644 --- a/src/components/ui/PageHeader.tsx +++ b/src/components/ui/PageHeader.tsx @@ -5,16 +5,15 @@ import { usePageTitle } from '@/lib/page-title-context'; interface PageHeaderProps { title: string; - subtitle: string; } -export function PageHeader({ title, subtitle }: PageHeaderProps) { +export function PageHeader({ title }: PageHeaderProps) { const { setPageTitle } = usePageTitle(); useEffect(() => { - setPageTitle(title, subtitle); - return () => setPageTitle('', ''); - }, [title, subtitle, setPageTitle]); + setPageTitle(title); + return () => setPageTitle(''); + }, [title, setPageTitle]); return null; } diff --git a/src/lib/page-title-context.tsx b/src/lib/page-title-context.tsx index f7095b6..097e32c 100644 --- a/src/lib/page-title-context.tsx +++ b/src/lib/page-title-context.tsx @@ -2,33 +2,25 @@ import { createContext, useContext, useState, useCallback, ReactNode } from 'react'; -interface PageTitleState { +interface PageTitleContextValue { title: string; - subtitle: string; -} - -interface PageTitleContextValue extends PageTitleState { - setPageTitle: (title: string, subtitle: string) => void; + setPageTitle: (title: string) => void; } const PageTitleContext = createContext({ title: '', - subtitle: '', setPageTitle: () => {}, }); export function PageTitleProvider({ children }: { children: ReactNode }) { - const [state, setState] = useState({ title: '', subtitle: '' }); + const [title, setTitle] = useState(''); - const setPageTitle = useCallback((title: string, subtitle: string) => { - setState(prev => { - if (prev.title === title && prev.subtitle === subtitle) return prev; - return { title, subtitle }; - }); + const setPageTitle = useCallback((t: string) => { + setTitle(prev => prev === t ? prev : t); }, []); return ( - + {children} );