AykutSarac 2 rokov pred
rodič
commit
6c270635ac
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      src/containers/Editor/BottomBar.tsx

+ 1 - 2
src/containers/Editor/BottomBar.tsx

@@ -78,8 +78,6 @@ export const BottomBar = () => {
   const [isPrivate, setIsPrivate] = React.useState(true);
 
   React.useEffect(() => {
-    console.log(data);
-
     setIsPrivate(data?.data.private ?? true);
   }, [data]);
 
@@ -107,6 +105,7 @@ export const BottomBar = () => {
 
   const setPrivate = () => {
     if (!query.json) return handleSaveJson();
+    setIsPrivate(!isPrivate);
     updateJson(query.json as string, { private: !isPrivate });
   };