cleaning things up
This commit is contained in:
@@ -178,6 +178,7 @@ export default function Header() {
|
||||
<Menu.Item
|
||||
key={device.deviceId}
|
||||
icon={device.deviceId == audioInputDeviceId ? <FaCheck /> : <></>}
|
||||
onClick={() => selectAudioInput(device.deviceId)}
|
||||
>
|
||||
<button>{device.label}</button>
|
||||
</Menu.Item>
|
||||
@@ -193,6 +194,7 @@ export default function Header() {
|
||||
<Menu.Item
|
||||
key={device.deviceId}
|
||||
icon={device.deviceId == audioOutputDeviceId ? <FaCheck /> : <></>}
|
||||
onClick={() => selectAudioOutput(device.deviceId)}
|
||||
>
|
||||
<button>{device.label}</button>
|
||||
</Menu.Item>
|
||||
|
||||
@@ -166,7 +166,7 @@ export default function TeamVoiceLine() {
|
||||
return teamUsers.map((tmember, i) => {
|
||||
return (
|
||||
<span
|
||||
onClick={() => audioContext.setSelectedTeamMember(tmember.id)}
|
||||
onClick={() => audioContext.selectTeamMember(tmember.id)}
|
||||
key={i}
|
||||
className={`rounded flex flex-row items-center py-2 px-2 justify-items-start ease-in-out duration-300 hover:cursor-pointer ${
|
||||
tmember.id == audioContext.selectedTeammate
|
||||
|
||||
@@ -99,10 +99,12 @@ export default function AudioContextProvider({ children }) {
|
||||
}
|
||||
|
||||
function selectAudioOutput(deviceId: string) {
|
||||
toast.success("Changed output device");
|
||||
setAudioOutputDevice(deviceId);
|
||||
}
|
||||
|
||||
function selectAudioInput(deviceId: string) {
|
||||
toast.success("Changed input device");
|
||||
setAudioInputDevice(deviceId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user