mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: observableHistoryInjectionToken and 1 revert for GlobalOverride
Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
1 parent
db9a3675e1
commit
8c0220c353
22 files changed
+51
-45
No files matched your search
@@ -4,13 +4,13 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||
import { observableHistoryInjectionToken } from "@k8slens/routing";
|
||||
|
||||
const currentPathInjectable = getInjectable({
|
||||
id: "current-path",
|
||||
|
||||
instantiate: (di) => {
|
||||
const observableHistory = di.inject(observableHistoryInjectable);
|
||||
const observableHistory = di.inject(observableHistoryInjectionToken);
|
||||
|
||||
return computed(() => observableHistory.location.pathname);
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||
import { observableHistoryInjectionToken } from "@k8slens/routing";
|
||||
import { runInAction } from "mobx";
|
||||
import type { NavigateToUrl } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
||||
import { navigateToUrlInjectionToken } from "../../common/front-end-routing/navigate-to-url-injection-token";
|
||||
@@ -14,7 +14,7 @@ const navigateToUrlInjectable = getInjectable({
|
||||
id: "navigate-to-url",
|
||||
|
||||
instantiate: (di): NavigateToUrl => {
|
||||
const observableHistory = di.inject(observableHistoryInjectable);
|
||||
const observableHistory = di.inject(observableHistoryInjectionToken);
|
||||
const broadcastMessage = di.inject(broadcastMessageInjectable);
|
||||
|
||||
return (url, options = {}): void => {
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import { parse as parseQueryString } from "query-string";
|
||||
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||
import { observableHistoryInjectionToken } from "@k8slens/routing";
|
||||
|
||||
const queryParametersInjectable = getInjectable({
|
||||
id: "query-parameters",
|
||||
|
||||
instantiate: (di) => {
|
||||
const observableHistory = di.inject(observableHistoryInjectable);
|
||||
const observableHistory = di.inject(observableHistoryInjectionToken);
|
||||
|
||||
return computed(() => parseQueryString(observableHistory.location.search));
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user