website-builder-backend / frontend /components /visualbuilder /ProductionVisualBuilder.jsx
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120
Raw
History Blame Contribute Delete
658 Bytes
"use client";
import {useEffect,useRef} from "react";
import grapesjs from "grapesjs";
import "grapesjs/dist/css/grapes.min.css";
import "grapesjs-preset-webpage";
export default function ProductionVisualBuilder(){
const editorRef=useRef(null);
useEffect(()=>{
if(editorRef.current)return;
editorRef.current=grapesjs.init({
container:"#gjs",
height:"100vh",
storageManager:false,
plugins:["grapesjs-preset-webpage"],
deviceManager:{
devices:[
{name:"Desktop",width:""},
{name:"Tablet",width:"768px"},
{name:"Mobile",width:"375px"}
]
}
});
return()=>{
editorRef.current?.destroy();
};
},[]);
return <div id="gjs" style={{height:"100vh"}}/>;
}