Skip to content

Commit

Permalink
fix: crashed when clicked on mic + webcam menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Oct 23, 2024
1 parent 777c073 commit 5f70cfd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/footer/icons/mic-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const MicMenu = ({ currentRoom }: IMicMenuProps) => {
</MenuButton>

<Transition
as={'div'}
show={open}
enter="transition duration-100 ease-out"
enterFrom="transform scale-95 opacity-0"
Expand Down
4 changes: 2 additions & 2 deletions src/components/footer/icons/mic-menu/items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const MicMenuItems = ({ currentRoom }: IMicMenuItemsProps) => {
const [newDevice, setNewDevice] = useState<string>();

useEffect(() => {
const devicesMenu = audioDevices.map((device) => {
const devicesMenu = audioDevices.map((device, i) => {
return (
<div className="" role="none" key={device.id}>
<div className="" role="none" key={`${device.id}-${i}`}>
<MenuItem>
{() => (
<p
Expand Down
1 change: 1 addition & 0 deletions src/components/footer/icons/webcam-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const WebcamMenu = ({ currentRoom }: IWebcamMenuProps) => {

{/* Use the Transition component. */}
<Transition
as={'div'}
show={open}
enter="transition duration-100 ease-out"
enterFrom="transform scale-95 opacity-0"
Expand Down
4 changes: 2 additions & 2 deletions src/components/footer/icons/webcam-menu/items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const WebcamMenuItems = ({ currentRoom }: IWebcamMenuItemsProps) => {
const [newDevice, setNewDevice] = useState<string>();

useEffect(() => {
const devicesMenu = videoDevices.map((device) => {
const devicesMenu = videoDevices.map((device, i) => {
return (
<div className="" role="none" key={device.id}>
<div className="" role="none" key={`${device.id}-${i}`}>
<MenuItem>
{() => (
<p
Expand Down

0 comments on commit 5f70cfd

Please sign in to comment.