const { ipcRenderer } = require('electron');

ipcRenderer.on('reset-app', (event, arg) => {
    document.location = 'reset.html';
});

ipcRenderer.on('new-note', (event, arg) => {
    const current = document.location.pathname.split('/').pop();
    if (current !== 'edit.html' || (document.location.search.trim() !== '' && current === 'edit.html')) {
        document.location = 'edit.html';
    }
});

ipcRenderer.on('loader', (event, arg) => {
    console.log('loader');
});