mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add common app routes to the protocol renderer router (#2272)
This commit is contained in:
1 parent
ca39379b3a
commit
0561f6bfd0
17 files changed
+129
-33
No files matched your search
@@ -5,11 +5,11 @@ import { clusterViewRoute, IClusterViewRouteParams } from "../components/cluster
|
||||
import { navigation } from "./history";
|
||||
|
||||
export function navigate(location: LocationDescriptor) {
|
||||
const currentLocation = navigation.getPath();
|
||||
const currentLocation = navigation.location.pathname;
|
||||
|
||||
navigation.push(location);
|
||||
|
||||
if (currentLocation === navigation.getPath()) {
|
||||
if (currentLocation === navigation.location.pathname) {
|
||||
navigation.goBack(); // prevent sequences of same url in history
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user