fix: add replace prop to fallback route (#782)

This to avoid adding unnecesary logs to the history, so back button goes previous page properly
This commit is contained in:
Brayan Cerón
2025-07-21 15:01:19 -05:00
committed by GitHub
parent 806c989eac
commit 3cda02be76

View File

@@ -110,7 +110,7 @@ const DiscussionSidebar = ({ displaySidebar, postActionBarRef }) => {
}
<Route path={ROUTES.LEARNERS.PATH} element={<LearnersView />} />
{configStatus === RequestStatus.SUCCESSFUL && (
<Route path={`${ROUTES.DISCUSSIONS.PATH}/*`} element={<Navigate to="posts" />} />
<Route path={`${ROUTES.DISCUSSIONS.PATH}/*`} element={<Navigate to="posts" replace />} />
)}
</Routes>
</Suspense>