fix side bar scrolls after clicking on lower item (#928)

* fix bug: side bar scrolls after clicking on lower item

Signed-off-by: Yangjun Wang <yangjun.wang@wartsila.com>

* fix issue main area missing issue, add mobx observer to TabLayout

Signed-off-by: Yangjun Wang <yangjun.wang@wartsila.com>

Co-authored-by: Yangjun Wang <yangjun.wang@wartsila.com>
This commit is contained in:
Yangjun WangandYangjun Wang authored and GitHub committed 2020-09-21 22:18:41 +03:00
1 parent 9a10db837e
commit cb3ab09b42
18 files changed
+185 -154

No files matched your search

+3 -3
View File
@@ -2,7 +2,7 @@ import React from "react";
import { observer } from "mobx-react";
import { Redirect, Route, Switch } from "react-router";
import { Trans } from "@lingui/macro";
import { MainLayout, TabRoute } from "../layout/main-layout";
import { TabLayout, TabRoute } from "../layout/tab-layout";
import { HelmCharts, helmChartsRoute, helmChartsURL } from "../+apps-helm-charts";
import { HelmReleases, releaseRoute, releaseURL } from "../+apps-releases";
import { namespaceStore } from "../+namespaces/namespace.store";
@@ -30,12 +30,12 @@ export class Apps extends React.Component {
render() {
const tabRoutes = Apps.tabRoutes;
return (
<MainLayout className="Apps" tabs={tabRoutes}>
<TabLayout className="Apps" tabs={tabRoutes}>
<Switch>
{tabRoutes.map((route, index) => <Route key={index} {...route}/>)}
<Redirect to={tabRoutes[0].url}/>
</Switch>
</MainLayout>
</TabLayout>
)
}
}