mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix: highlight sidebar's active section (#2366)
* - fix: highlight active sidebar section / link - fix: caching crd definitions to prevent sidebar's scroll jumps - refactored & simplified `Sidebar` and `SidebarItem` Signed-off-by: Roman <ixrock@gmail.com> * responding to comments Signed-off-by: Roman <ixrock@gmail.com> * adding @jsdoc comments to SidebarItem Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
ee4d434d35
commit
4303700bb2
3 files changed
+80
-54
No files matched your search
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Redirect, Route, Switch } from "react-router";
|
||||
import { TabLayout, TabLayoutRoute } from "../layout/tab-layout";
|
||||
import { crdResourcesRoute, crdRoute, crdURL, crdDefinitionsRoute } from "./crd.route";
|
||||
import { crdDefinitionsRoute, crdResourcesRoute, crdURL } from "./crd.route";
|
||||
import { CrdList } from "./crd-list";
|
||||
import { CrdResources } from "./crd-resources";
|
||||
|
||||
@@ -14,7 +14,7 @@ export class CustomResources extends React.Component {
|
||||
title: "Definitions",
|
||||
component: CustomResources,
|
||||
url: crdURL(),
|
||||
routePath: crdRoute.path.toString(),
|
||||
routePath: String(crdDefinitionsRoute.path),
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user