[Refactor] Change the function names.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
import { useMicDeviceList as useStoreMicDeviceList } from "@store";
|
||||
import { useStore_MicDeviceList } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useMicDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentMicDeviceList, updateMicDeviceList } = useStoreMicDeviceList();
|
||||
const { currentMicDeviceList, updateMicDeviceList } = useStore_MicDeviceList();
|
||||
|
||||
const getMicDeviceList = () => {
|
||||
updateMicDeviceList(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/list_mic_device");
|
||||
};
|
||||
|
||||
return { currentMicDeviceList, getMicDeviceList, updateMicDeviceList };
|
||||
return {
|
||||
currentMicDeviceList,
|
||||
getMicDeviceList,
|
||||
updateMicDeviceList,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user