fix: replace current history entry on redirections

This commit is contained in:
Ali BARIN
2022-08-02 20:41:30 +02:00
parent 913a2773c1
commit 03efe3f0b3
3 changed files with 3 additions and 3 deletions

View File

@@ -165,7 +165,7 @@ export default function Application(): React.ReactElement | null {
<Route <Route
path="/" path="/"
element={( element={(
<Navigate to={app.supportsConnections ? URLS.APP_CONNECTIONS(appKey) : URLS.APP_FLOWS(appKey)} /> <Navigate to={app.supportsConnections ? URLS.APP_CONNECTIONS(appKey) : URLS.APP_FLOWS(appKey)} replace />
)} )}
/> />
</Routes> </Routes>

View File

@@ -34,7 +34,7 @@ export default (
<Route path={URLS.UPDATES} element={<Layout><Notifications /></Layout>} /> <Route path={URLS.UPDATES} element={<Layout><Notifications /></Layout>} />
<Route path="/" element={<Navigate to={URLS.FLOWS} />} /> <Route path="/" element={<Navigate to={URLS.FLOWS} replace />} />
<Route path={`${URLS.SETTINGS}`}> <Route path={`${URLS.SETTINGS}`}>
{settingsRoutes} {settingsRoutes}

View File

@@ -8,6 +8,6 @@ export default (
<> <>
<Route path={URLS.SETTINGS_PROFILE} element={<SettingsLayout><ProfileSettings /></SettingsLayout>} /> <Route path={URLS.SETTINGS_PROFILE} element={<SettingsLayout><ProfileSettings /></SettingsLayout>} />
<Route path={URLS.SETTINGS} element={<Navigate to={URLS.SETTINGS_PROFILE} />} /> <Route path={URLS.SETTINGS} element={<Navigate to={URLS.SETTINGS_PROFILE} replace />} />
</> </>
); );