import { FEATURES, getEntryPointType } from '@/config/features'; import { useRouter } from '@/providers/RouterProvider'; import { Suspense } from 'react'; import PageErrorBoundary from '@/components/PageErrorBoundary'; import PageSkeleton from '@/components/PageSkeleton'; import { cn } from '@/lib/utils'; import { AlertTriangle } from 'lucide-react'; const entryPointType = getEntryPointType(); export default function RouterContainer() { const { currentPage, isLoaded } = useRouter(); const animationClass = currentPage === 'dashboard' ? 'page-transition-dashboard' : 'page-transition-enter'; if (!isLoaded) { return ; } const currentFeature = FEATURES.find((f) => f.key === currentPage); const MatchedComponent = currentFeature?.components?.[entryPointType]; return (
} > {MatchedComponent ? ( ) : (

页面未找到

{`该功能在当前运行环境(${entryPointType})下不可用或已被移除。`}

)}
); }