2025-03-19 06:04:06 +00:00
|
|
|
"use client";
|
2025-03-26 00:30:00 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { DrawIoEmbed } from "react-drawio";
|
2025-03-25 02:24:12 +00:00
|
|
|
import ChatPanel from "@/components/chat-panel";
|
2025-03-27 08:24:17 +00:00
|
|
|
import { useDiagram } from "@/contexts/diagram-context";
|
2025-03-19 06:04:06 +00:00
|
|
|
|
2025-03-27 08:17:54 +00:00
|
|
|
export default function Home() {
|
2025-03-26 00:30:00 +00:00
|
|
|
const { drawioRef, handleDiagramExport } = useDiagram();
|
2025-03-19 08:16:44 +00:00
|
|
|
|
2025-03-26 00:30:00 +00:00
|
|
|
return (
|
2025-03-27 08:24:17 +00:00
|
|
|
<div className="flex h-screen bg-gray-100">
|
|
|
|
|
<div className="w-2/3 p-1 h-full relative">
|
|
|
|
|
<DrawIoEmbed
|
|
|
|
|
ref={drawioRef}
|
|
|
|
|
onExport={handleDiagramExport}
|
|
|
|
|
urlParameters={{
|
|
|
|
|
spin: true,
|
|
|
|
|
libraries: false,
|
|
|
|
|
saveAndExit: false,
|
|
|
|
|
noExitBtn: true,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2025-03-27 08:17:54 +00:00
|
|
|
</div>
|
2025-03-27 08:24:17 +00:00
|
|
|
<div className="w-1/3 h-full p-1">
|
|
|
|
|
<ChatPanel />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-03-26 00:30:00 +00:00
|
|
|
);
|
|
|
|
|
}
|