11import React from "react" ;
2- import widgets from "../../../../ui-config/widgets" ;
3- import type { AppState , AppDispatch } from "@courselit/state-management" ;
4- import { COMPONENT_MISSING_SUFFIX } from "../../../../ui-config/strings" ;
5- import WidgetErrorBoundary from "./widget-error-boundary" ;
2+ import widgets from "@/ui-config/widgets" ;
3+ import { COMPONENT_MISSING_SUFFIX } from "@/ui-config/strings" ;
4+ import WidgetErrorBoundary from "@/components/public/base-layout/template/widget-error-boundary" ;
65import { useTheme } from "next-themes" ;
76import { WidgetDefaultSettings , WidgetProps } from "@courselit/common-models" ;
87
9- interface WidgetByNameProps {
10- id : string ;
11- name : string ;
12- state : Partial < AppState > ;
13- dispatch ?: AppDispatch ;
14- settings : Record < string , unknown > ;
15- pageData : Record < string , unknown > ;
16- editing : boolean ;
17- }
18-
198const WidgetByName = ( {
209 id,
2110 name,
@@ -25,7 +14,7 @@ const WidgetByName = ({
2514 pageData,
2615 editing = false ,
2716} : Omit < WidgetProps < WidgetDefaultSettings > , "toggleTheme" | "nextTheme" > ) => {
28- const { theme : nextTheme , setTheme : setNextTheme } = useTheme ( ) ;
17+ const { resolvedTheme : nextTheme , setTheme : setNextTheme } = useTheme ( ) ;
2918
3019 const toggleTheme = ( ) => {
3120 const themeNext = nextTheme === "dark" ? "light" : "dark" ;
0 commit comments