Introduce and use windowLocationInjectable

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-10-04 17:55:31 -04:00
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;