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
@@ -2,11 +2,16 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { createBrowserHistory } from "history";
|
||||
import { getInjectable, getInjectionToken } from "@ogre-tools/injectable";
|
||||
import type { History } from "history";
|
||||
import { createBrowserHistory } from "history";
|
||||
|
||||
export const historyInjectionToken = getInjectionToken<History>({
|
||||
id: "history-injection-token",
|
||||
});
|
||||
|
||||
export const historyInjectable = getInjectable({
|
||||
id: "history",
|
||||
instantiate: (): History => createBrowserHistory(),
|
||||
instantiate: () => createBrowserHistory(),
|
||||
injectionToken: historyInjectionToken,
|
||||
});
|
||||
Reference in new issue
Block a user