Quellcode durchsuchen

Hide bad redirect

Jo Chuang vor 5 Jahren
Ursprung
Commit
0f73c0d606
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 1 1
      dashboard/src/main/Main.tsx
  2. 2 1
      dashboard/src/main/home/Home.tsx

+ 1 - 1
dashboard/src/main/Main.tsx

@@ -93,7 +93,7 @@ export default class Main extends Component<PropsType, StateType> {
 
         // TODO: Possible template this into a map from url to routed home
         {...authedUrls.map(route =>
-            <Route path={`/${route}`} render={() => {
+            <Route key={route} path={`/${route}`} render={() => {
             if (this.state.isLoggedIn && this.state.initialized) {
               return (
                 <Home 

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

@@ -79,7 +79,8 @@ class Home extends Component<PropsType, StateType> {
         this.props.history.push("integrations");
         this.setState({ sidebarReady: true, ghRedirect: false });
       } else {
-        this.props.history.push("dashboard");
+        // TODO: figure out when exactly in flow we need to send user to dashboard
+        // this.props.history.push("dashboard");
         this.setState({ sidebarReady: true });
       }
     });