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
@@ -12,7 +12,7 @@ import { cssNames } from "@k8slens/utilities";
|
||||
import { CloseButton } from "./close-button";
|
||||
import { getLegacyGlobalDiForExtensionApi } from "../../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
|
||||
import navigateToCatalogInjectable from "../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
|
||||
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||
import { observableHistoryInjectionToken } from "@k8slens/routing";
|
||||
|
||||
export interface SettingLayoutProps extends React.DOMAttributes<any> {
|
||||
className?: IClassName;
|
||||
@@ -31,7 +31,7 @@ const defaultProps: Partial<SettingLayoutProps> = {
|
||||
back: () => {
|
||||
const di = getLegacyGlobalDiForExtensionApi();
|
||||
const navigateToCatalog = di.inject(navigateToCatalogInjectable);
|
||||
const observableHistory = di.inject(observableHistoryInjectable);
|
||||
const observableHistory = di.inject(observableHistoryInjectionToken);
|
||||
|
||||
if (observableHistory.length <= 1) {
|
||||
navigateToCatalog();
|
||||
|
||||
@@ -15,7 +15,7 @@ import { Tab, Tabs } from "../tabs";
|
||||
import { ErrorBoundary } from "../error-boundary";
|
||||
import type { ObservableHistory } from "mobx-observable-history";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import { observableHistoryInjectable } from "@k8slens/routing";
|
||||
import { observableHistoryInjectionToken } from "@k8slens/routing";
|
||||
import type { Navigate } from "../../navigation/navigate.injectable";
|
||||
import navigateInjectable from "../../navigation/navigate.injectable";
|
||||
|
||||
@@ -94,7 +94,7 @@ const NonInjectedTabLayout = observer((props: TabLayoutProps & Dependencies) =>
|
||||
export const TabLayout = withInjectables<Dependencies, TabLayoutProps>(NonInjectedTabLayout, {
|
||||
getProps: (di, props) => ({
|
||||
...props,
|
||||
observableHistory: di.inject(observableHistoryInjectable),
|
||||
observableHistory: di.inject(observableHistoryInjectionToken),
|
||||
navigate: di.inject(navigateInjectable),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user