Skip to content

Commit

Permalink
CW-mention-streams
Browse files Browse the repository at this point in the history
Added check for no redirect
  • Loading branch information
pvm-code committed Dec 30, 2024
1 parent 24090bc commit 15162d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/commonFeed/components/FeedLayout/FeedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ const FeedLayout: ForwardRefRenderFunction<FeedLayoutRef, FeedLayoutProps> = (
outerStyles,
settings,
renderChatInput,
onPullToRefresh,
} = props;
useDisableOverscroll();
const { getCommonPagePath } = useRoutesContext();
Expand Down Expand Up @@ -654,6 +653,14 @@ useEffect(() => {
onFeedItemSelect(commonId, feedItemId, messageId);
setActiveChatItem({ feedItemId });
} else {
const isInbox = window.location.pathname === ROUTE_PATHS.INBOX;
if (isInbox && commonId && feedItemId) {
const queryParamsForPath = {
item: feedItemId,
};
history.push(getCommonPagePath(commonId, queryParamsForPath));
}

setActiveChatItem({ feedItemId });
}

Expand Down

0 comments on commit 15162d8

Please sign in to comment.