[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.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useStore_SelectableCTranslate2ComputeDeviceList } from "@store";
|
||||
import { useStdoutToPython } from "@useStdoutToPython";
|
||||
import { transformToIndexedArray } from "@utils";
|
||||
|
||||
export const useSelectableCTranslate2ComputeDeviceList = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
@@ -10,9 +11,15 @@ export const useSelectableCTranslate2ComputeDeviceList = () => {
|
||||
asyncStdoutToPython("/get/data/translation_compute_device_list");
|
||||
};
|
||||
|
||||
const updateSelectableCTranslate2ComputeDeviceList_FromBackend = (payload) => {
|
||||
updateSelectableCTranslate2ComputeDeviceList(transformToIndexedArray(payload));
|
||||
};
|
||||
|
||||
return {
|
||||
currentSelectableCTranslate2ComputeDeviceList,
|
||||
getSelectableCTranslate2ComputeDeviceList,
|
||||
updateSelectableCTranslate2ComputeDeviceList,
|
||||
|
||||
updateSelectableCTranslate2ComputeDeviceList_FromBackend,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user