diff --git a/admin-spa/src/components/PageHeader.tsx b/admin-spa/src/components/PageHeader.tsx index a55b5ae..a4b0cf1 100644 --- a/admin-spa/src/components/PageHeader.tsx +++ b/admin-spa/src/components/PageHeader.tsx @@ -1,20 +1,26 @@ import React from 'react'; +import { useLocation } from 'react-router-dom'; import { usePageHeader } from '@/contexts/PageHeaderContext'; interface PageHeaderProps { fullscreen?: boolean; + hideOnDesktop?: boolean; } -export function PageHeader({ fullscreen = false }: PageHeaderProps) { +export function PageHeader({ fullscreen = false, hideOnDesktop = false }: PageHeaderProps) { const { title, action } = usePageHeader(); + const location = useLocation(); if (!title) return null; + // Special case: Payments page should hide header on desktop (has its own layout) + const isPaymentsPage = location.pathname.startsWith('/settings/payments'); + const shouldHideOnDesktop = hideOnDesktop || isPaymentsPage; + // PageHeader is now ABOVE submenu in DOM order // z-20 ensures it stays on top when both are sticky - // Mobile-only: hidden on desktop (md:hidden) return ( -