Просмотр исходного кода

Merge pull request #261 from porter-dev/beta.3.lift-to-routes

Hotfix for broken redirect
abelanger5 5 лет назад
Родитель
Сommit
733ef23075
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      dashboard/src/main/home/Home.tsx

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

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