TASKS-1823 WebManager module

This commit is contained in:
Igor Martyniuk
2026-08-28 08:35:58 +00:00
parent fdb2cf3837
commit c93d8c025b
654 changed files with 26232 additions and 6075 deletions
+24
View File
@@ -0,0 +1,24 @@
import type { ComponentType } from 'react';
import type { PageDocument, PageSearchParams } from '#web-runtime/types';
import BlogPageLayout from './components/BlogPageLayout';
import EditorialPageLayout from './components/EditorialPageLayout';
import StandardPageLayout from './components/StandardPageLayout';
export interface PageLayoutProps {
page: PageDocument;
searchParams?: PageSearchParams;
}
type PageLayout = ComponentType<PageLayoutProps>;
export const PAGE_LAYOUT_REGISTRY: Readonly<Record<string, PageLayout>> = {
'landing': StandardPageLayout,
'blog': BlogPageLayout,
'blog-item': EditorialPageLayout
};
export function RegisteredPageLayout({ page, searchParams }: PageLayoutProps) {
const Layout = PAGE_LAYOUT_REGISTRY[page.layout] ?? StandardPageLayout;
return <Layout page={page} searchParams={searchParams} />;
}