[hotfix] log renderer errors

This commit is contained in:
MathieuG-P
2023-03-18 15:37:48 +01:00
parent 6eb2866eee
commit fefd552f60
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -2,12 +2,19 @@ import { createRoot } from 'react-dom/client';
import { HashRouter } from 'react-router-dom';
import 'tailwindcss/tailwind.css';
import './index.css'
import { IpcService } from './services/ipc.service';
const launcherContainer = document.getElementById('launcher');
const oneclickDownloadMapContainer = document.getElementById('oneclick-download-map');
const oneclickDownloadPlaylistContainer = document.getElementById('oneclick-download-playlist');
const oneclickDownloadModelContainer = document.getElementById('oneclick-download-model');
const ipc = IpcService.getInstance();
window.onerror = (...data) => {
ipc.sendLazy('log-error', {args: data});
}
if(launcherContainer){
import("./windows/Launcher").then(reactWindow => {
createRoot(launcherContainer).render(<reactWindow.default/>);