Fix router to make it easier to actually navigate around the app

This commit is contained in:
Dane Everitt 2019-06-22 18:09:42 -07:00
parent f34593e777
commit 60f32f055e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 42 additions and 34 deletions

View file

@ -6,7 +6,7 @@ import AccountRouter from '@/routers/AccountRouter';
import ServerOverviewContainer from '@/components/ServerOverviewContainer';
import { StoreProvider } from 'easy-peasy';
import { store } from '@/state';
import { UserData } from '@/state/types';
import TransitionRouter from '@/TransitionRouter';
interface WindowWithUser extends Window {
PterodactylUser?: {
@ -39,11 +39,13 @@ const App = () => {
return (
<StoreProvider store={store}>
<Router basename={'/'}>
<div className={'mx-auto px-10 w-auto'} style={{ maxWidth: '1000px' }}>
<Route exact path="/" component={ServerOverviewContainer}/>
<Route path="/auth" component={AuthenticationRouter}/>
<Route path="/account" component={AccountRouter}/>
</div>
<TransitionRouter basename={'/'}>
<div className={'mx-auto w-auto'} style={{ maxWidth: '1000px' }}>
<Route exact path="/" component={ServerOverviewContainer}/>
<Route path="/auth" component={AuthenticationRouter}/>
<Route path="/account" component={AccountRouter}/>
</div>
</TransitionRouter>
</Router>
</StoreProvider>
);