[Refactor] Change the function names.

This commit is contained in:
Sakamoto Shiina
2024-09-10 21:11:15 +09:00
parent b4d164e116
commit e1d8f59890
45 changed files with 230 additions and 191 deletions

View File

@@ -1,14 +1,18 @@
import { useSpeakerDeviceList as useStoreSpeakerDeviceList } from "@store";
import { useStore_SpeakerDeviceList } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useSpeakerDeviceList = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentSpeakerDeviceList, updateSpeakerDeviceList } = useStoreSpeakerDeviceList();
const { currentSpeakerDeviceList, updateSpeakerDeviceList } = useStore_SpeakerDeviceList();
const getSpeakerDeviceList = () => {
updateSpeakerDeviceList(() => new Promise(() => {}));
asyncStdoutToPython("/controller/list_speaker_device");
};
return { currentSpeakerDeviceList, getSpeakerDeviceList, updateSpeakerDeviceList };
return {
currentSpeakerDeviceList,
getSpeakerDeviceList,
updateSpeakerDeviceList,
};
};