Attempting to solve a weird console loading issue by making into class component; doesn't fix but like the class better for this.

Loading the console, switching to file manager, and then switching back is needed to load the data the first time. After that every 2nd load of the console will load the data (and even send the data to the websocket as the daemon is reporting.)
This commit is contained in:
Dane Everitt 2019-06-29 18:28:23 -07:00
parent 6b42296865
commit 16e6f3f45f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 125 additions and 65 deletions

View file

@ -6,6 +6,7 @@ import { store } from '@/state';
import DashboardRouter from '@/routers/DashboardRouter';
import ServerRouter from '@/routers/ServerRouter';
import AuthenticationRouter from '@/routers/AuthenticationRouter';
import { Provider } from 'react-redux';
interface WindowWithUser extends Window {
PterodactylUser?: {
@ -37,17 +38,19 @@ const App = () => {
return (
<StoreProvider store={store}>
<Router basename={'/'}>
<div className={'mx-auto w-auto'}>
<BrowserRouter basename={'/'}>
<Switch>
<Route path="/server/:id" component={ServerRouter}/>
<Route path="/auth" component={AuthenticationRouter}/>
<Route path="/" component={DashboardRouter}/>
</Switch>
</BrowserRouter>
</div>
</Router>
<Provider store={store}>
<Router basename={'/'}>
<div className={'mx-auto w-auto'}>
<BrowserRouter basename={'/'}>
<Switch>
<Route path="/server/:id" component={ServerRouter}/>
<Route path="/auth" component={AuthenticationRouter}/>
<Route path="/" component={DashboardRouter}/>
</Switch>
</BrowserRouter>
</div>
</Router>
</Provider>
</StoreProvider>
);
};