Remove 'multi language translation enable/disable' related methods that is no longer in use from quite ago.
27 lines
782 B
JavaScript
27 lines
782 B
JavaScript
import { useStore_MicDeviceList } from "@store";
|
|
import { useStdoutToPython } from "@useStdoutToPython";
|
|
import { arrayToObject } from "@utils";
|
|
|
|
export const useMicDeviceList = () => {
|
|
const { asyncStdoutToPython } = useStdoutToPython();
|
|
const { currentMicDeviceList, updateMicDeviceList, pendingMicDeviceList } = useStore_MicDeviceList();
|
|
|
|
const getMicDeviceList = () => {
|
|
pendingMicDeviceList();
|
|
asyncStdoutToPython("/get/data/mic_device_list");
|
|
};
|
|
|
|
|
|
const updateMicDeviceList_FromBackend = (payload) => {
|
|
updateMicDeviceList(arrayToObject(payload));
|
|
};
|
|
|
|
|
|
return {
|
|
currentMicDeviceList,
|
|
getMicDeviceList,
|
|
updateMicDeviceList,
|
|
|
|
updateMicDeviceList_FromBackend,
|
|
};
|
|
}; |