Jo Chuang 5 anni fa
parent
commit
9d7397b1b1
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      dashboard/src/main/home/Home.tsx

+ 3 - 1
dashboard/src/main/home/Home.tsx

@@ -93,8 +93,10 @@ class Home extends Component<PropsType, StateType> {
       if (err) {
       if (err) {
         console.log(err);
         console.log(err);
       } else if (res.data) {
       } else if (res.data) {
+        console.log("NOPROJ");
+        console.log(res.data);
         if (res.data.length === 0) {
         if (res.data.length === 0) {
-          <Redirect to="new-project"></Redirect>
+          this.props.history.push("new-project");
         } else if (res.data.length > 0 && !currentProject) {
         } else if (res.data.length > 0 && !currentProject) {
           setProjects(res.data);
           setProjects(res.data);