'use client'; import React from 'react'; import { usePathname } from 'next/navigation'; /** * SitePageFrame wraps page content. * For portal and operations routes that manage their own internal
landmark, * it renders a non-semantic
to avoid invalid nested
elements. * For standard public and content routes, it renders a semantic
landmark * to ensure assistive technologies can identify the primary content. */ export function SitePageFrame({ children }: { children: React.ReactNode }) { const pathname = usePathname(); const isPortalRoute = pathname?.includes('/manage') || pathname?.startsWith('/admin'); if (isPortalRoute) { return
{children}
; } return
{children}
; }