Files
VRCT/src-ui/logics/configs/device/useMicHostList.js
Sakamoto Shiina fb2b224231 [Refactor] (Huge Refactoring) ReceiveRoutes: change the way define endpoints, hooks and methods.
Remove 'multi language translation enable/disable' related methods that is no longer in use from quite ago.
2025-06-14 03:29:22 +09:00

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,
};
};