diff --git a/src/js/components/navbar.js b/src/js/components/navbar.js index 8dcbb67..bd4eccc 100644 --- a/src/js/components/navbar.js +++ b/src/js/components/navbar.js @@ -1,14 +1,19 @@ var React = require('react'); +var ipc = window.require('ipc'); var NavBar = React.createClass({ + handleClose: function (evt) { + ipc.send('close'); + }, + render: function () { return ( diff --git a/src/main.js b/src/main.js index c625def..b4ebc16 100644 --- a/src/main.js +++ b/src/main.js @@ -40,4 +40,8 @@ ipc.on('hide', function () { ipc.on('show', function () { mainWindow.show(); +}); + +ipc.on('close', function () { + mainWindow.close(); }); \ No newline at end of file