"use client"; import { useEffect, useState } from "react"; import DraggablePanel from "@/components/DraggablePanel"; import Logo from "@/widgets/Logo"; import Preview from "@/components/Draggable/Preview"; import Draggable from "@/components/Draggable/Draggable"; import PreviewStore from "@/stores/previewStore"; import { useObserver } from "mobx-react-lite"; import ComponentsStore from "@/stores/componentStore"; import ComponentPaletteDrawer from "@/components/ComponentPaletteDrawer"; export default function Home() { const [isChangeSize, setIsSizeChangeSize] = useState(false); const [isDraggable, setIsDraggable] = useState(false); const { components } = ComponentsStore; // useEffect(() => { // ComponentsStore.initComponent([ // { // id: "1", // x: 0, // y: 0, // width: 320, // height: 160, // component: () => // }, // { // id: "2", // x: 336, // y: 0, // width: 160, // height: 320, // component: () => // }, // { // id: "3", // x: 336, // y: 0, // width: 160, // height: 320, // component: () => // }, // { // id: "4", // x: 336, // y: 0, // width: 160, // height: 320, // component: () => // }, // { // id: "5", // x: 336, // y: 0, // width: 160, // height: 320, // component: () => // }, // { // id: "6", // x: 336, // y: 0, // width: 160, // height: 320, // component: () => // }, // ]); // }, []) return useObserver(() => (
{ComponentsStore.components.map((item) => ( ))}
)); }