mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add debug prints for actions against the navigation object
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
5c6a6e14f5
commit
f099489244
@ -1,6 +1,15 @@
|
|||||||
import { ipcRenderer } from "electron";
|
import { ipcRenderer } from "electron";
|
||||||
import { createBrowserHistory, createMemoryHistory } from "history";
|
import { createBrowserHistory, createMemoryHistory } from "history";
|
||||||
import { createObservableHistory } from "mobx-observable-history";
|
import { createObservableHistory } from "mobx-observable-history";
|
||||||
|
import { getHostedClusterId } from "../../common/cluster-store";
|
||||||
|
import logger from "../../main/logger";
|
||||||
|
|
||||||
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
||||||
export const navigation = createObservableHistory(history);
|
export const navigation = createObservableHistory(history);
|
||||||
|
|
||||||
|
navigation.listen((location, action) => {
|
||||||
|
const clusterId = getHostedClusterId();
|
||||||
|
const frame = clusterId ?? "root";
|
||||||
|
|
||||||
|
logger.debug(`[NAVIGATION]: ${action}`, { location, frame });
|
||||||
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user