瀏覽代碼

fix render edit post on create new post

makstravm 2 年之前
父節點
當前提交
386183616c
共有 2 個文件被更改,包括 1 次插入2 次删除
  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(() => {