Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/components/Workspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { isRtl } from "../i18n/utils/rtl";
import { useSearchParams } from "react-router-dom";
import { get } from "../api/gists";

export const IdContext = createContext({ gistId: "", setGistId: () => {} });
export const IdContext = createContext({ gistId: "", setGistId: () => { } });

const SIDEPANEL_MIN_WIDTH = 384;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -464,11 +465,10 @@ export default function WorkSpace() {
<div
key={x.name}
onClick={() => setSelectedDb(x.label)}
className={`space-y-3 p-3 rounded-md border-2 select-none ${
settings.mode === "dark"
? "bg-zinc-700 hover:bg-zinc-600"
: "bg-zinc-100 hover:bg-zinc-200"
} ${selectedDb === x.label ? "border-zinc-400" : "border-transparent"}`}
className={`space-y-3 p-3 rounded-md border-2 select-none ${settings.mode === "dark"
? "bg-zinc-700 hover:bg-zinc-600"
: "bg-zinc-100 hover:bg-zinc-200"
} ${selectedDb === x.label ? "border-zinc-400" : "border-transparent"}`}
>
<div className="flex items-center justify-between">
<div className="font-semibold">{x.name}</div>
Expand Down