Skip to content

Commit 3cda02b

Browse files
authored
fix: add replace prop to fallback route (#782)
This to avoid adding unnecesary logs to the history, so back button goes previous page properly
1 parent 806c989 commit 3cda02b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/discussions/discussions-home/DiscussionSidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const DiscussionSidebar = ({ displaySidebar, postActionBarRef }) => {
110110
}
111111
<Route path={ROUTES.LEARNERS.PATH} element={<LearnersView />} />
112112
{configStatus === RequestStatus.SUCCESSFUL && (
113-
<Route path={`${ROUTES.DISCUSSIONS.PATH}/*`} element={<Navigate to="posts" />} />
113+
<Route path={`${ROUTES.DISCUSSIONS.PATH}/*`} element={<Navigate to="posts" replace />} />
114114
)}
115115
</Routes>
116116
</Suspense>

0 commit comments

Comments
 (0)