feat: enhance layout and error handling in canvas component

- Added suppressHydrationWarning to RootLayout for improved hydration handling.
- Updated error logging in CanvasInner to use more descriptive parameters, enhancing debugging capabilities.
This commit is contained in:
Matthias
2026-03-31 15:39:06 +02:00
parent 73bdf56f72
commit 3ac8857025
2 changed files with 3 additions and 2 deletions

View File

@@ -1836,9 +1836,9 @@ function CanvasInner({ canvasId }: CanvasInnerProps) {
setEdges((eds) => applyEdgeChanges(changes, eds));
}, []);
const onFlowError = useCallback((code: string, message: string) => {
const onFlowError = useCallback((id: string, error: string) => {
if (process.env.NODE_ENV === "production") return;
console.error("[ReactFlow error]", { canvasId, code, message });
console.error("[ReactFlow error]", { canvasId, id, error });
}, [canvasId]);
// ─── Delete Edge on Drop ──────────────────────────────────────