fix create breakouts option in userlist dropdown

This commit is contained in:
Ramón Souza 2024-06-05 11:34:26 -03:00
parent 6e3b582bdd
commit 48ba1d5875

View File

@ -303,7 +303,7 @@ const UserTitleOptions: React.FC<UserTitleOptionsProps> = ({
{
key: 'separator-02',
isSeparator: true,
allow: true,
allow: canCreateBreakout,
},
{
allow: isLearningDashboardEnabled(),
@ -381,7 +381,7 @@ const UserTitleOptionsContainer: React.FC = () => {
const { data: meetingInfo } = useMeeting((meeting: Partial<Meeting>) => ({
voiceSettings: meeting?.voiceSettings,
isBreakout: meeting?.isBreakout,
breakoutPolicies: meeting?.breakoutPolicies,
componentsFlags: meeting?.componentsFlags,
name: meeting?.name,
}));
@ -392,14 +392,15 @@ const UserTitleOptionsContainer: React.FC = () => {
// in case of current user isn't load yet
if (!currentUser?.isModerator ?? true) return null;
const hasBreakoutRooms = meetingInfo?.componentsFlags?.hasBreakoutRoom ?? false;
return (
<UserTitleOptions
isRTL={isRTL}
isMeetingMuted={meetingInfo?.voiceSettings?.muteOnStart}
isBreakout={meetingInfo?.isBreakout}
isModerator={currentUser?.isModerator ?? false}
hasBreakoutRooms={meetingInfo?.breakoutPolicies?.breakoutRooms !== undefined
&& meetingInfo.breakoutPolicies.breakoutRooms.length > 0}
hasBreakoutRooms={hasBreakoutRooms}
meetingName={meetingInfo?.name}
/>
);