refactor: register modal in electron

This commit is contained in:
Carlos Valente
2024-10-27 10:20:01 +01:00
committed by Carlos Valente
parent 80ff3251ea
commit 43b390a079
4 changed files with 23 additions and 12 deletions
@@ -6,6 +6,7 @@ import { IoClose } from '@react-icons/all-files/io5/IoClose';
import { IoSettingsOutline } from '@react-icons/all-files/io5/IoSettingsOutline';
import ProductionNavigationMenu from '../../common/components/navigation-menu/ProductionNavigationMenu';
import { useElectronListener } from '../../common/hooks/useElectronEvent';
import { useWindowTitle } from '../../common/hooks/useWindowTitle';
import AppSettings from '../app-settings/AppSettings';
import useAppSettingsNavigation from '../app-settings/useAppSettingsNavigation';
@@ -26,6 +27,9 @@ export default function Editor() {
useWindowTitle('Editor');
// we need to register the listener to change the editor location
useElectronListener();
// listen to shutdown request from electron process
useEffect(() => {
if (window.process?.type === 'renderer') {