Add local settings

This commit is contained in:
jeffvli
2022-10-24 22:38:06 -07:00
parent f09abdb4c6
commit 863dce88b7
6 changed files with 52 additions and 4 deletions
+15
View File
@@ -1 +1,16 @@
import isElectron from 'is-electron';
export * from './hooks/useDefaultSettings';
const ipc = isElectron() ? window.electron.ipcRenderer : null;
const get = (property: string) => ipc?.SETTINGS_GET({ property });
const set = (property: string, value: any) => {
ipc?.SETTINGS_SET({ property, value });
};
export const settings = {
get,
set,
};