import { useBackend } from '../backend'; import { Button, LabeledList, Slider, Section } from '../components'; import { Window } from '../layouts'; type Data = { volume_channels: { key; val: number }[]; }; export const VolumePanel = (props, context) => { const { act, data } = useBackend(context); const { volume_channels } = data; return (
{Object.keys(volume_channels).map((key) => ( act('adjust_volume', { channel: key, vol: val / 100 })} />
); };