From f1d632587b88373198f030e591968b503c0c2a94 Mon Sep 17 00:00:00 2001 From: zimiovid <61754500+zimiovid@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:28:09 +0500 Subject: [PATCH] Always use gistId from URL for sharing, prevent duplicate gist creation (#511) * fix: prevent duplicate gist creation * feat: change from useEffect to loadFromGist * Update Workspace.jsx --- src/components/Workspace.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Workspace.jsx b/src/components/Workspace.jsx index ebba0f5..fd24554 100644 --- a/src/components/Workspace.jsx +++ b/src/components/Workspace.jsx @@ -290,6 +290,7 @@ export default function WorkSpace() { const res = await get(shareId); const diagramSrc = res.data.files["share.json"].content; const d = JSON.parse(diagramSrc); + setGistId(shareId); setUndoStack([]); setRedoStack([]); setLoadedFromGistId(shareId);