diff --git a/.changeset/strong-foxes-lie.md b/.changeset/strong-foxes-lie.md new file mode 100644 index 0000000000000..6ecad643ae3f7 --- /dev/null +++ b/.changeset/strong-foxes-lie.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes an issue where the room menu inside the sidebar item remains visible when the sidebar is collapsed diff --git a/apps/meteor/client/sidebar/RoomMenu.tsx b/apps/meteor/client/sidebar/RoomMenu.tsx index 508753263954a..ea0bacccfef40 100644 --- a/apps/meteor/client/sidebar/RoomMenu.tsx +++ b/apps/meteor/client/sidebar/RoomMenu.tsx @@ -1,6 +1,6 @@ import type { RoomType } from '@rocket.chat/core-typings'; import { GenericMenu } from '@rocket.chat/ui-client'; -import { useTranslation } from '@rocket.chat/ui-contexts'; +import { useLayout, useTranslation } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; import { memo } from 'react'; @@ -30,11 +30,21 @@ const RoomMenu = ({ hideDefaultOptions = false, }: RoomMenuProps): ReactElement | null => { const t = useTranslation(); - + const { sidebar } = useLayout(); const isUnread = alert || unread || threadUnread; const sections = useRoomMenuActions({ rid, type, name, isUnread, cl, roomOpen, hideDefaultOptions }); - return ; + return ( + + ); }; export default memo(RoomMenu);