[Refactor] Refactor the way import files.

Organize some codes.
This commit is contained in:
Sakamoto Shiina
2024-10-11 00:23:52 +09:00
parent 4de48edbc1
commit d44c2dd7d9
44 changed files with 157 additions and 114 deletions

View File

@@ -0,0 +1,18 @@
import { useStore_SpeakerDeviceList } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useSpeakerDeviceList = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentSpeakerDeviceList, updateSpeakerDeviceList, pendingSpeakerDeviceList } = useStore_SpeakerDeviceList();
const getSpeakerDeviceList = () => {
pendingSpeakerDeviceList();
asyncStdoutToPython("/get/data/speaker_device_list");
};
return {
currentSpeakerDeviceList,
getSpeakerDeviceList,
updateSpeakerDeviceList,
};
};