Config Page: Device Tab. threshold component. fix problem that the input component focused out when input something each time. Set threshold data when started python.
14 lines
543 B
JavaScript
14 lines
543 B
JavaScript
import { useMicHostList as useStoreMicHostList } from "@store";
|
|
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
|
|
|
export const useMicHostList = () => {
|
|
const { asyncStdoutToPython } = useStdoutToPython();
|
|
const { currentMicHostList, updateMicHostList } = useStoreMicHostList();
|
|
|
|
const getMicHostList = () => {
|
|
updateMicHostList(() => new Promise(() => {}));
|
|
asyncStdoutToPython("/controller/list_mic_host");
|
|
};
|
|
|
|
return { currentMicHostList, getMicHostList, updateMicHostList };
|
|
}; |