Skip to content
Snippets Groups Projects
Unverified Commit f79bd311 authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

Regression: Fix go to ThreadList hook (#27663)

parent 12cb1c81
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import { useRoom } from '../../../contexts/RoomContext';
export const useGoToThreadList = (): (() => void) => {
const room = useRoom();
const [routeName] = useCurrentRoute();
const [routeName, { context, ...params } = { context: '' }] = useCurrentRoute();
if (!routeName) {
throw new Error('Route name is not defined');
......@@ -13,6 +13,6 @@ export const useGoToThreadList = (): (() => void) => {
const roomRoute = useRoute(routeName);
return useCallback(() => {
roomRoute.replace({ rid: room._id, ...(room.name && { name: room.name }), tab: 'thread' });
}, [room._id, room.name, roomRoute]);
roomRoute.replace({ rid: room._id, ...params, tab: 'thread' });
}, [room._id, roomRoute, params]);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment