Skip to content

Commit

Permalink
Organise handlePublisherRequest button
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Jan 8, 2025
1 parent 645cd92 commit 5396586
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 3 additions & 1 deletion react/src/Components/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ function Footer(props) {
<RequestPublishButton
footer={true}
rounded={false}
handlePublisherRequest={()=>props?.handlePublisherRequest()}
handlePublisherRequest={()=> {
props?.handlePublisherRequest()
}}
/>
</Grid>
: null}
Expand Down
10 changes: 6 additions & 4 deletions react/src/Components/PublisherRequestTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import Stack from "@mui/material/Stack";
import Grid from "@mui/material/Grid";
import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import {styled} from "@mui/material/styles";
import {styled, useTheme} from "@mui/material/styles";
import { SvgIcon } from "./SvgIcon";

const PublisherRequestName = styled(Typography)(({ theme }) => ({
color: "#000",
color: theme.palette?.participantListIcon?.primary,
fontWeight: 500,
fontSize: 14,
}));
Expand All @@ -20,6 +20,8 @@ const PinBtn = styled(Button)(({ theme }) => ({
}));

function PublisherRequestTab(props) {
const theme = useTheme();

const getPublisherRequestItem = (streamId) => {
return (
<Grid
Expand Down Expand Up @@ -58,10 +60,10 @@ function PublisherRequestTab(props) {
<div style={{width: "100%", overflowY: "auto"}}>
<Stack sx={{width: "100%",}} spacing={2}>
<Grid container>
<SvgIcon size={28} name="participants" color="#000"/>
<SvgIcon size={28} name="participants" color={theme.palette?.participantListIcon?.primary}/>
<PublisherRequestName
variant="body2"
style={{marginLeft: 8, fontWeight: 500}}
style={{marginLeft: 8, fontWeight: 500, color: theme.palette?.participantListIcon?.primary}}
>
{props?.requestSpeakerList.length}
</PublisherRequestName>
Expand Down
7 changes: 6 additions & 1 deletion react/src/pages/AntMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@ function AntMedia(props) {
handleParticipantListOpen={(open) => handleParticipantListOpen(open)}
requestSpeakerList={requestSpeakerList}
handlePublisherRequestListOpen={(open) => setPublisherRequestListDrawerOpen(open)}
handlePublisherRequest={()=>{}}
handlePublisherRequest={()=>handlePublisherRequest()}
setLeftTheRoom={(left) => setLeftTheRoom(left)}
addFakeParticipant={() => addFakeParticipant()}
removeFakeParticipant={() => removeFakeParticipant()}
Expand Down Expand Up @@ -3520,10 +3520,15 @@ function AntMedia(props) {
setPublisherRequestListDrawerOpen={(open) => setPublisherRequestListDrawerOpen(open)}
/>
<PublisherRequestListDrawer
publisherRequestListDrawerOpen={publisherRequestListDrawerOpen}
approveBecomeSpeakerRequest={(streamId) => approveBecomeSpeakerRequest(streamId)}
rejectBecomeSpeakerRequest={(streamId) => rejectBecomeSpeakerRequest(streamId)}
requestSpeakerList={requestSpeakerList}
publishStreamId={publishStreamId}
handleMessageDrawerOpen={(open) => handleMessageDrawerOpen(open)}
handleParticipantListOpen={(open) => handleParticipantListOpen(open)}
handleEffectsOpen={(open) => handleEffectsOpen(open)}
setPublisherRequestListDrawerOpen={(open) => setPublisherRequestListDrawerOpen(open)}
/>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/MeetingRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const MeetingRoom = React.memo((props) => {
requestSpeakerList={props?.requestSpeakerList}
publisherRequestListDrawerOpen={props?.publisherRequestListDrawerOpen}
handlePublisherRequestListOpen={props?.handlePublisherRequestListOpen}
handlePublisherRequest={props?.handlePublisherRequest}
handlePublisherRequest={()=> {props?.handlePublisherRequest()}}
setLeftTheRoom={props?.setLeftTheRoom}
addFakeParticipant={props?.addFakeParticipant}
removeFakeParticipant={props?.removeFakeParticipant}
Expand Down

0 comments on commit 5396586

Please sign in to comment.