rename composable files to composable notation

This commit is contained in:
riqo 2021-06-15 08:48:14 -05:00
commit 0a3c9f71d8
18 changed files with 217 additions and 202 deletions

View file

@ -0,0 +1,21 @@
export default function useIpc () {
const invoke = async (endpoint: string, payload: any) => {
try {
const res = await window.ipcRenderer.invoke(endpoint, payload);
return res;
} catch (e) {
throw e;
}
}
const post = (endpoint: string, payload: any) => {
window.ipcRenderer.send(endpoint, payload);
};
return {
invoke,
post
}
}