@@ -24,7 +24,7 @@ import {
2424} from "@dnd-kit/core" ;
2525import { addToast } from "@heroui/react" ;
2626import { IMCMessageTypeEnum , ViewModel } from "@pulse-editor/shared-utils" ;
27- import { Node as ReactFlowNode , useReactFlow } from "@xyflow/react" ;
27+ import { Node as ReactFlowNode } from "@xyflow/react" ;
2828import { ReactNode , useContext , useEffect , useState } from "react" ;
2929import { createPortal } from "react-dom" ;
3030import { v4 } from "uuid" ;
@@ -58,7 +58,6 @@ export default function DndProvider({
5858 } ) ;
5959 const { isLandscape } = useScreenSize ( ) ;
6060 const { createAppViewInCanvasView } = useTabViewManager ( ) ;
61- const { updateNodeData } = useReactFlow ( ) ;
6261
6362 const [ mounted , setMounted ] = useState ( false ) ;
6463
@@ -93,7 +92,7 @@ export default function DndProvider({
9392 recommendedHeight : app . config . recommendedHeight ,
9493 recommendedWidth : app . config . recommendedWidth ,
9594 } ;
96- createAppViewInCanvasView ( config ) ;
95+ await createAppViewInCanvasView ( config ) ;
9796 } catch ( error ) {
9897 addToast ( {
9998 title : "Failed to open app" ,
@@ -112,10 +111,12 @@ export default function DndProvider({
112111 recommendedWidth : app . config . recommendedWidth ,
113112 } ;
114113
115- const { viewId, node, paramName } = over . data . current as {
114+ const { viewId, node, paramName, updateNodeData } = over . data
115+ . current as {
116116 viewId : string ;
117117 node : ReactFlowNode < AppNodeData > ;
118118 paramName : string ;
119+ updateNodeData : ( id : string , data : Partial < AppNodeData > ) => void ;
119120 } ;
120121
121122 updateNodeData ( viewId , {
0 commit comments