mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-07-18 10:11:24 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user