[Refactor] Refactor the way import files.
Organize some codes.
This commit is contained in:
3
src-ui/logics/common/index.js
Normal file
3
src-ui/logics/common/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export { useIsOpenedConfigPage } from "./useIsOpenedConfigPage";
|
||||
export { useMessage } from "./useMessage";
|
||||
export { useVolume } from "./useVolume";
|
||||
@@ -1,17 +1,10 @@
|
||||
import { useStore_IsOpenedConfigPage } from "@store";
|
||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
||||
|
||||
export const useIsOpenedConfigPage = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { currentIsOpenedConfigPage, updateIsOpenedConfigPage } = useStore_IsOpenedConfigPage();
|
||||
|
||||
const setIsOpenedConfigPage = (is_opened) => {
|
||||
updateIsOpenedConfigPage(is_opened);
|
||||
// if (is_opened) {
|
||||
// asyncStdoutToPython("/set/enable/config_window");
|
||||
// } else {
|
||||
// asyncStdoutToPython("/set/disable/config_window");
|
||||
// }
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user