Move IPC listeners to separate classes
This commit is contained in:
12
src/ipc/ipc-init.js
Normal file
12
src/ipc/ipc-init.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import ipcTypes from "../ipc.types";
|
||||
import { store } from "../redux/store";
|
||||
import { signOutStart } from "../redux/user/user.actions";
|
||||
const { ipcRenderer } = window.require("electron");
|
||||
|
||||
console.log("----Initializing IPC Listeners in React App.");
|
||||
|
||||
ipcRenderer.on(ipcTypes.default.filewatcher.startSuccess, (event, obj) => {
|
||||
console.log(ipcTypes.default.filewatcher.startSuccess, obj);
|
||||
|
||||
store.dispatch(signOutStart());
|
||||
});
|
||||
Reference in New Issue
Block a user