'init'
This commit is contained in:
22
app/hooks/useWindowActions.ts
Normal file
22
app/hooks/useWindowActions.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
export function useWindowActions() {
|
||||
const toggle = () => {
|
||||
console.info("TOGGLE");
|
||||
window.electron.ipcRenderer.invoke('window-toggle');
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
console.info("CLOSE");
|
||||
window.electron.ipcRenderer.invoke('window-close');
|
||||
}
|
||||
|
||||
const minimize = () => {
|
||||
console.info("MINIMIZE");
|
||||
window.electron.ipcRenderer.invoke('window-minimize');
|
||||
}
|
||||
|
||||
return {
|
||||
toggle,
|
||||
minimize,
|
||||
close
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user