Skip to content

Commit 42a0a3b

Browse files
committed
Unlike src/routes/notifications/routes.jsx in this file a Switch is exported instead of just routes, which is capturing any unmatched route and making any route below this unaccessible (e.g. /404 or /error). Also, comma after jsx comments is required because jsx is not contained inside any function
1 parent 8c9288a commit 42a0a3b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/routes/settings/routes.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Settings routes
33
*/
44
import React from 'react'
5-
import { Route, Switch } from 'react-router-dom'
5+
import { Route } from 'react-router-dom'
66
import { renderApp } from '../../components/App/App'
77
import TopBarContainer from '../../components/TopBar/TopBarContainer'
88
import NotificationsToolBar from '../notifications/components/NotificationsToolBar'
@@ -12,9 +12,7 @@ import NotificationSettingsContainer from './routes/notifications/containers/Not
1212
// import ProfileSettingsContainer from './routes/profile/containers/ProfileSettingsContainer'
1313

1414
export default (
15-
<Switch>
16-
{/*<Route path="/settings/profile" render={renderApp(<TopBarContainer toolbar={SettingsToolBar} />, <ProfileSettingsContainer />)} />*/}
17-
{/*<Route path="/settings/system" render={renderApp(<TopBarContainer toolbar={SettingsToolBar} />, <SystemSettingsContainer />)} />*/}
18-
<Route path="/settings/notifications" render={renderApp(<TopBarContainer toolbar={NotificationsToolBar} />, <NotificationSettingsContainer />)} />
19-
</Switch>
15+
{/*<Route path="/settings/profile" render={renderApp(<TopBarContainer toolbar={SettingsToolBar} />, <ProfileSettingsContainer />)} />*/},
16+
{/*<Route path="/settings/system" render={renderApp(<TopBarContainer toolbar={SettingsToolBar} />, <SystemSettingsContainer />)} />*/},
17+
<Route path="/settings/notifications" render={renderApp(<TopBarContainer toolbar={NotificationsToolBar} />, <NotificationSettingsContainer />)} />
2018
)

0 commit comments

Comments
 (0)