feat: add example

This commit is contained in:
2026-08-01 09:31:08 +03:00
parent 15805e28df
commit 26b59686a5
434 changed files with 34975 additions and 4995 deletions

View File

@@ -0,0 +1 @@
export { {{name.pascalCase}}PageEntry } from './{{name.kebabCase}}.entry'

View File

@@ -0,0 +1,23 @@
import { ComponentRenderer } from 'infra/cms/component-renderer'
import { digitalPlatformApi } from '@biocadless/digital-platform-api'
import type { CmsPageEntryProps } from 'infra/cms/cms-page-entry-registry'
/**
* Входная точка CMS-страницы {{name.pascalCase}}.
*
* Используется для:
* - загрузки дерева CMS-компонентов страницы
* - подключения страницы к dynamic CMS routing
*/
export const {{name.pascalCase}}PageEntry = async (props: CmsPageEntryProps) => {
const { pageId } = props
const components = await digitalPlatformApi.componentInstances.listV1({ pageId })
return (
<>
{components.map((component) => (
<ComponentRenderer key={component.id} data={component} />
))}
</>
)
}