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