Skip to content

Commit

Permalink
fix(App): Don't let the app get confused by unknown routes
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Apr 8, 2022
1 parent fc2f97e commit d2059fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app.js
Expand Up @@ -5,7 +5,7 @@ import { render } from 'react-dom';
import { Provider } from 'mobx-react';
import { syncHistoryWithStore, RouterStore } from 'mobx-react-router';
import {
Router, Route, hashHistory, IndexRedirect,
Router, Route, hashHistory, IndexRoute, IndexRedirect,
} from 'react-router';

import '@babel/polyfill';
Expand Down Expand Up @@ -90,6 +90,7 @@ window.addEventListener('load', () => {
<Route path="/settings/team" component={TeamScreen} />
<Route path="/settings/app" component={EditSettingsScreen} />
<Route path="/settings/invite" component={InviteSettingsScreen} />
<Route path="/announcements/*" component={null} />
</Route>
</Route>
<Route path="/auth" component={AuthLayoutContainer}>
Expand All @@ -108,7 +109,9 @@ window.addEventListener('load', () => {
<Route path="/auth/logout" component={LoginScreen} />
</Route>
<Route path="/payment/:url" component={SubscriptionPopupScreen} />
<Route path="*" component={AppLayoutContainer} />
<Route path="*">
<IndexRedirect to='/' />
</Route>
</Router>
</I18N>
</Provider>
Expand Down

0 comments on commit d2059fc

Please sign in to comment.