import React from 'react'; import { notFound, useParams } from '@tanstack/react-router'; import Icon from '@/utils/Icon'; import ErrorBoundary from '@/components/Common/ErrorBoundary'; import { SheetOverlay } from '@/components/Common/SheetOverlay'; import { getPageOverlay } from '@/config/pageOverlayConfig'; /** * PageOverlay — full-screen bottom sheet for custom page content. * * Opened via the /page/$id route. Resolves content from pageOverlayConfig * and renders it inside the shared SheetOverlay chrome. * * @return {JSX.Element} The page overlay component. */ export const PageOverlay: React.FC = () => { const { id = '' } = useParams({ strict: false }); const pageDefinition = getPageOverlay( id ); if ( ! pageDefinition ) { throw notFound(); } const PageContent = pageDefinition.component; const title = (