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

{t('router.notFound')}

{t('router.notFoundDescription', { entryPointType })}

)}
); }