import { useTranslation } from 'react-i18next' import useWaitForI18n from '../../../shared/hooks/use-wait-for-i18n' import withErrorBoundary from '../../../infrastructure/error-boundary' import { GenericErrorBoundaryFallback } from '@/shared/components/generic-error-boundary-fallback' import DefaultNavbar from '@/features/ui/components/bootstrap-5/navbar/default-navbar' import Footer from '@/features/ui/components/bootstrap-5/footer/footer' import getMeta from '@/utils/meta' import OLCol from '@/features/ui/components/ol/ol-col' import OLRow from '@/features/ui/components/ol/ol-row' import TemplateDetails from './template-details' import TemplatePreview from './template-preview' import { useTemplateContext, TemplateProvider } from '../context/template-context' function TemplateRoot() { const { isReady } = useWaitForI18n() if (!isReady) { return null } return ( ) } function TemplatePageContent() { const { t } = useTranslation() const navbarProps = getMeta('ol-navbar') const footerProps = getMeta('ol-footer') const { template } = useTemplateContext() const { templateLinks } = getMeta('ol-ExposedSettings') || [] const categoryName = templateLinks?.find(link => link.url === template.category)?.name return ( <>
{t('all_templates')} {categoryName && template.category !== '/templates/all' && ( <> / {categoryName} )}