diff --git a/src/components/Workspace.jsx b/src/components/Workspace.jsx index 38f53d542..79656ff83 100644 --- a/src/components/Workspace.jsx +++ b/src/components/Workspace.jsx @@ -30,9 +30,9 @@ import { nanoid } from "nanoid"; export const IdContext = createContext({ gistId: "", - setGistId: () => {}, + setGistId: () => { }, version: "", - setVersion: () => {}, + setVersion: () => { }, }); const SIDEPANEL_MIN_WIDTH = 384; @@ -203,12 +203,12 @@ export default function WorkSpace() { t.id ? t : { - ...t, - id: nanoid(), - fields: t.fields.map((f) => - f.id ? f : { ...f, id: nanoid() }, - ), - }, + ...t, + id: nanoid(), + fields: t.fields.map((f) => + f.id ? f : { ...f, id: nanoid() }, + ), + }, ), ); } else { @@ -263,12 +263,12 @@ export default function WorkSpace() { t.id ? t : { - ...t, - id: nanoid(), - fields: t.fields.map((f) => - f.id ? f : { ...f, id: nanoid() }, - ), - }, + ...t, + id: nanoid(), + fields: t.fields.map((f) => + f.id ? f : { ...f, id: nanoid() }, + ), + }, ), ); } else { @@ -322,12 +322,12 @@ export default function WorkSpace() { t.id ? t : { - ...t, - id: nanoid(), - fields: t.fields.map((f) => - f.id ? f : { ...f, id: nanoid() }, - ), - }, + ...t, + id: nanoid(), + fields: t.fields.map((f) => + f.id ? f : { ...f, id: nanoid() }, + ), + }, ), ); } else { @@ -373,12 +373,12 @@ export default function WorkSpace() { t.id ? t : { - ...t, - id: nanoid(), - fields: t.fields.map((f) => - f.id ? f : { ...f, id: nanoid() }, - ), - }, + ...t, + id: nanoid(), + fields: t.fields.map((f) => + f.id ? f : { ...f, id: nanoid() }, + ), + }, ), ); } else { @@ -498,9 +498,8 @@ export default function WorkSpace() { useEffect(() => { document.title = "Editor | drawDB"; - load(); - }, [load]); + }, []); return (