diff --git a/electron/launcher/src/App.tsx b/electron/launcher/src/App.tsx index c03a1f3..2e0e003 100644 --- a/electron/launcher/src/App.tsx +++ b/electron/launcher/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import React from 'react'; import { Router, Route, Switch } from 'react-router-dom'; import { ToastContainer, toast } from 'react-toastify'; @@ -26,14 +26,6 @@ const ipc = window.require('electron').ipcRenderer; const App = props => { - // app start check for game client update - useEffect(() => { - if(props.patch.reqInitialCheck){ - props.checkForUpdate(true); - } - // eslint-disable-next-line - }, [props.patch.reqInitialCheck]); - // LISTENS FOR UPDATE FROM MAIN PROCESS ipc.on('launcher-update-ready', e => { toast.info(, { diff --git a/electron/launcher/src/components/Root/Root.tsx b/electron/launcher/src/components/Root/Root.tsx index 0a69aa9..dd9d84d 100644 --- a/electron/launcher/src/components/Root/Root.tsx +++ b/electron/launcher/src/components/Root/Root.tsx @@ -1,9 +1,17 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { connect } from 'react-redux'; -import { userActions } from '_actions'; +import { patcherActions } from '_actions'; const Root = (props) => { + // app start check for game client update + useEffect(() => { + if(props.patch.reqInitialCheck){ + props.checkForUpdate(true); + } + // eslint-disable-next-line + }, [props.patch.reqInitialCheck]); + return (
@@ -20,4 +28,4 @@ const mapStateToProps = (state) => { return state; } -export default connect(mapStateToProps, userActions)(Root); +export default connect(mapStateToProps, patcherActions)(Root);