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.

12 lines (11 loc) 442 B
'use client'; import { RenderWidgetService } from '../../services/render-widget-service'; export function RenderViewClient(props) { if (!props.viewName) { return null; } const views = RenderWidgetService.widgetRegistry.widgets[props.widgetKey]?.views || {}; const view = views[props.viewName]; const viewFunction = typeof (view) === 'object' ? view.ViewFunction : view; return viewFunction(props.viewProps); }