Files
VRCT/src-ui/logics/configs/useSoftwareVersion.js
2024-09-24 11:51:57 +09:00

18 lines
590 B
JavaScript

import { useStore_SoftwareVersion } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useSoftwareVersion = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentSoftwareVersion, updateSoftwareVersion, pendingSoftwareVersion } = useStore_SoftwareVersion();
const getSoftwareVersion = () => {
pendingSoftwareVersion();
asyncStdoutToPython("/get/data/version");
};
return {
currentSoftwareVersion,
getSoftwareVersion,
updateSoftwareVersion,
};
};