Skip to content

Commit

Permalink
[WS] Improve Settings 404 UX
Browse files Browse the repository at this point in the history
- This was the only remaining WS route I found that either did not have a 404 or a fallback to some overview page, so I tweaked the redirect order for a graceful redirect (vs a blank page)
  • Loading branch information
cee-chen committed Jun 24, 2021
1 parent 90c7fc4 commit 8f19efb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Redirect, Route, Switch } from 'react-router-dom';
import { useActions } from 'kea';

import {
ORG_SETTINGS_PATH,
ORG_SETTINGS_CUSTOMIZE_PATH,
ORG_SETTINGS_CONNECTORS_PATH,
ORG_SETTINGS_OAUTH_APPLICATION_PATH,
Expand All @@ -33,7 +32,6 @@ export const SettingsRouter: React.FC = () => {

return (
<Switch>
<Redirect exact from={ORG_SETTINGS_PATH} to={ORG_SETTINGS_CUSTOMIZE_PATH} />
<Route exact path={ORG_SETTINGS_CUSTOMIZE_PATH}>
<Customize />
</Route>
Expand All @@ -48,6 +46,9 @@ export const SettingsRouter: React.FC = () => {
<SourceConfig sourceIndex={i} />
</Route>
))}
<Route>
<Redirect to={ORG_SETTINGS_CUSTOMIZE_PATH} />
</Route>
</Switch>
);
};

0 comments on commit 8f19efb

Please sign in to comment.