Prechádzať zdrojové kódy

fix render edit post on create new post

makstravm 2 rokov pred
rodič
commit
386183616c
2 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 0 1
      src/App.js
  2. 1 1
      src/pages/EntityEditorPost.jsx

+ 0 - 1
src/App.js

@@ -55,7 +55,6 @@ const AppContent = ({ isToken }) => {
 }
 
 const CAppContent = connect(state => ({ isToken: state.auth?.token }))(AppContent)
-store.subscribe(() => console.log(store.getState()))
 
 function App() {
     return (

+ 1 - 1
src/pages/EntityEditorPost.jsx

@@ -37,7 +37,7 @@ const EntityEditorPost = ({ match: { params: { _id } }, myID, entity, status, on
             clearState()
             clearStatus('sentPost')
         }
-    }, []);
+    }, [_id]);
 
 
     useEffect(() => {