Skip to content

Commit

Permalink
fix: on stage actions
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 authored Sep 5, 2023
1 parent 8fa0105 commit 6e70bc9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ const ParticipantMoreActions = ({ peerId, role }) => {
const localPeerId = useHMSStore(selectLocalPeerID);
const isLocal = localPeerId === peerId;
const [open, setOpen] = useState(false);
const showStageOption =
canChangeRole && off_stage_roles.includes(role) && (isInStage ? remove_from_stage_label : bring_to_stage_label);

const handleStageAction = async () => {
if (isInStage) {
Expand Down Expand Up @@ -268,7 +270,7 @@ const ParticipantMoreActions = ({ peerId, role }) => {
</Dropdown.Trigger>
<Dropdown.Portal>
<Dropdown.Content align="end" sideOffset={8} css={{ w: '$64', bg: '$surface_default' }}>
{canChangeRole ? (
{showStageOption ? (
<Dropdown.Item css={{ bg: '$surface_default' }} onClick={() => handleStageAction()}>
<ChangeRoleIcon />
<Text variant="sm" css={{ ml: '$4', fontWeight: '$semiBold', c: '$on_surface_high' }}>
Expand Down

0 comments on commit 6e70bc9

Please sign in to comment.