mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Extract an injectionToken
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
1 parent
0dae1594ba
commit
db9a3675e1
7 files changed
+19
-14
No files matched your search
@@ -12,7 +12,7 @@ import { DiContextProvider } from "@ogre-tools/injectable-react";
|
||||
import { Router } from "react-router";
|
||||
import { DefaultProps } from "../../mui-base-theme";
|
||||
import { ClusterFrame } from "./cluster-frame";
|
||||
import { historyInjectable } from "@k8slens/routing";
|
||||
import { historyInjectionToken } from "@k8slens/routing";
|
||||
import { computed } from "mobx";
|
||||
import { Cluster } from "../../../common/cluster/cluster";
|
||||
import subscribeStoresInjectable from "../../kube-watch-api/subscribe-stores.injectable";
|
||||
@@ -34,7 +34,7 @@ describe("<ClusterFrame />", () => {
|
||||
di = getDiForUnitTesting();
|
||||
render = () => testingLibraryRender((
|
||||
<DiContextProvider value={{ di }}>
|
||||
<Router history={di.inject(historyInjectable)}>
|
||||
<Router history={di.inject(historyInjectionToken)}>
|
||||
{DefaultProps(ClusterFrame)}
|
||||
</Router>
|
||||
</DiContextProvider>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { Router } from "react-router";
|
||||
import { historyInjectable } from "@k8slens/routing";
|
||||
import { historyInjectionToken } from "@k8slens/routing";
|
||||
import React from "react";
|
||||
|
||||
import {
|
||||
@@ -15,7 +15,7 @@ const routingReactApplicationHocInjectable = getInjectable({
|
||||
id: "routing-react-application-hoc",
|
||||
|
||||
instantiate: (di) => {
|
||||
const history = di.inject(historyInjectable);
|
||||
const history = di.inject(historyInjectionToken);
|
||||
|
||||
return ({ children }) =>
|
||||
(
|
||||
|
||||
Reference in new issue
Block a user