diff --git a/apps/meteor/client/navbar/NavBarControls/NavBarControlsSection.tsx b/apps/meteor/client/navbar/NavBarControls/NavBarControlsSection.tsx index 5b37dc7c1e9e7..2bec3bf54b848 100644 --- a/apps/meteor/client/navbar/NavBarControls/NavBarControlsSection.tsx +++ b/apps/meteor/client/navbar/NavBarControls/NavBarControlsSection.tsx @@ -18,16 +18,19 @@ const NavBarControlsSection = () => { const callAction = useMediaCallAction(); if (isMobile) { - return ( - - {(showOmnichannel || callAction) && } - - - {user ? : } - - - ); - } + return ( + + {callAction && } + {showOmnichannel && } + {(showOmnichannel || callAction) && } + + + {user ? : } + + + ); +} + return ( diff --git a/apps/meteor/client/views/room/Header/RoomHeader.tsx b/apps/meteor/client/views/room/Header/RoomHeader.tsx index 3d0cb83ebbcc6..1ca876d4dd039 100644 --- a/apps/meteor/client/views/room/Header/RoomHeader.tsx +++ b/apps/meteor/client/views/room/Header/RoomHeader.tsx @@ -4,6 +4,9 @@ import { Header, HeaderContent, HeaderContentRow, HeaderToolbar } from '@rocket. import type { ReactNode } from 'react'; import { Suspense } from 'react'; import { useTranslation } from 'react-i18next'; +import { IconButton } from '@rocket.chat/fuselage'; +import { useHistory } from 'react-router-dom'; + import FederatedRoomOriginServer from './FederatedRoomOriginServer'; import ParentRoom from './ParentRoom'; @@ -33,10 +36,28 @@ export type RoomHeaderProps = { const RoomHeader = ({ room, slots = {} }: RoomHeaderProps) => { const { t } = useTranslation(); + const history = useHistory(); + + const isDirectMessage = room?.t === 'd'; + + const handleBack = () => { + history.push('/'); + }; + return ( -
- {slots?.start} +
+ {isDirectMessage && ( + + )} + {slots?.start} + {slots?.preContent}