Skip to content

Commit

Permalink
Fix/client hang after login (#52) (#53)
Browse files Browse the repository at this point in the history
* Updating configs for release

* fixed bug where client does not update after logging in

* fixed bug where client does not update after logging in

Co-authored-by: Benjamin Zhao <[email protected]>
Co-authored-by: allenaerostar <[email protected]>

Co-authored-by: Benjamin Zhao <[email protected]>
Co-authored-by: allenaerostar <[email protected]>
  • Loading branch information
3 people authored Dec 28, 2019
1 parent 3ea02a2 commit 74971a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 1 addition & 9 deletions electron/launcher/src/App.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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(<UpgradePrompt />, {
Expand Down
14 changes: 11 additions & 3 deletions electron/launcher/src/components/Root/Root.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<section className="container">
<div className="row">
Expand All @@ -20,4 +28,4 @@ const mapStateToProps = (state) => {
return state;
}

export default connect(mapStateToProps, userActions)(Root);
export default connect(mapStateToProps, patcherActions)(Root);

0 comments on commit 74971a5

Please sign in to comment.