mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce and use windowLocationInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
fd19280065
commit
c3c736c065
3 files changed
+25
-4
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 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";
|
||||
|
||||
const windowLocationInjectable = getInjectable({
|
||||
id: "window-location",
|
||||
instantiate: () => {
|
||||
const { host, port } = window.location;
|
||||
|
||||
return { host, port };
|
||||
},
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
export default windowLocationInjectable;
|
||||
Reference in new issue
Block a user