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 (#2321)
This commit is contained in:
parent
c815396622
commit
373d2d2a47
@ -1,6 +1,14 @@
|
||||
import { ipcRenderer } from "electron";
|
||||
import { createBrowserHistory, createMemoryHistory } from "history";
|
||||
import { createObservableHistory } from "mobx-observable-history";
|
||||
import logger from "../../main/logger";
|
||||
|
||||
export const history = ipcRenderer ? createBrowserHistory() : createMemoryHistory();
|
||||
export const navigation = createObservableHistory(history);
|
||||
|
||||
navigation.listen((location, action) => {
|
||||
const isClusterView = !process.isMainFrame;
|
||||
const domain = global.location.href;
|
||||
|
||||
logger.debug(`[NAVIGATION]: ${action}`, { isClusterView, domain, location });
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user