Remove 'multi language translation enable/disable' related methods that is no longer in use from quite ago.
25 lines
748 B
JavaScript
25 lines
748 B
JavaScript
import { useStore_MicHostList } from "@store";
|
|
import { useStdoutToPython } from "@useStdoutToPython";
|
|
import { arrayToObject } from "@utils";
|
|
|
|
export const useMicHostList = () => {
|
|
const { asyncStdoutToPython } = useStdoutToPython();
|
|
const { currentMicHostList, updateMicHostList, pendingMicHostList } = useStore_MicHostList();
|
|
|
|
const getMicHostList = () => {
|
|
pendingMicHostList();
|
|
asyncStdoutToPython("/get/data/mic_host_list");
|
|
};
|
|
|
|
const updateMicHostList_FromBackend = (payload) => {
|
|
updateMicHostList(arrayToObject(payload));
|
|
};
|
|
|
|
return {
|
|
currentMicHostList,
|
|
getMicHostList,
|
|
updateMicHostList,
|
|
|
|
updateMicHostList_FromBackend,
|
|
};
|
|
}; |