UNPKG

@progress/sitefinity-nextjs-sdk

Version:

Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.

13 lines (12 loc) 664 B
import { jsx as _jsx } from "react/jsx-runtime"; import { RenderWidgetService } from '../../services/render-widget-service'; import { RenderLazyForCSR } from './lazy-component-for-csr'; import { RenderLazyForSSR } from './lazy-component-for-ssr'; export async function LazyComponent(props) { const widgetName = props.model.Name; const widgetEntry = RenderWidgetService.widgetRegistry.widgets[widgetName]; if (widgetEntry && !widgetEntry.ssr) { return _jsx(RenderLazyForCSR, { id: props.model.Id, requestContext: props.requestContext }); } return (_jsx(RenderLazyForSSR, { id: props.model.Id, requestContext: props.requestContext })); }