[Chore] Change the name of functions. Remove and organize some imports.

This commit is contained in:
Sakamoto Shiina
2024-12-08 17:38:56 +09:00
parent e7b8dac36d
commit a2bcbed780
2 changed files with 7 additions and 9 deletions

View File

@@ -19,9 +19,9 @@ export const App = () => {
return ( return (
<div className={styles.container}> <div className={styles.container}>
<StartPythonFacadeComponent /> <StartPythonController />
<UiLanguageController /> <UiLanguageController />
<ConfigPageCloseTrigger /> <ConfigPageCloseTriggerController />
<UiSizeController /> <UiSizeController />
<FontFamilyController /> <FontFamilyController />
<TransparencyController /> <TransparencyController />
@@ -72,7 +72,7 @@ import {
useMainFunction, useMainFunction,
} from "@logics_main"; } from "@logics_main";
const StartPythonFacadeComponent = () => { const StartPythonController = () => {
const { asyncStartPython } = useStartPython(); const { asyncStartPython } = useStartPython();
const hasRunRef = useRef(false); const hasRunRef = useRef(false);
const { asyncFetchFonts } = useAsyncFetchFonts(); const { asyncFetchFonts } = useAsyncFetchFonts();
@@ -80,7 +80,7 @@ const StartPythonFacadeComponent = () => {
useEffect(() => { useEffect(() => {
if (!hasRunRef.current) { if (!hasRunRef.current) {
asyncStartPython().then(() => { asyncStartPython().then(() => {
startFeedingToWatchDog(); startFeedingToWatchDogController();
asyncFetchFonts(); asyncFetchFonts();
}).catch((err) => { }).catch((err) => {
console.error(err); console.error(err);
@@ -104,7 +104,7 @@ const UiLanguageController = () => {
import { useStore_MainFunctionsStateMemory } from "@store"; import { useStore_MainFunctionsStateMemory } from "@store";
const ConfigPageCloseTrigger = () => { const ConfigPageCloseTriggerController = () => {
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage(); const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory(); const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory();
const { const {
@@ -198,7 +198,7 @@ const TransparencyController = () => {
}; };
import { useStdoutToPython } from "@logics/useStdoutToPython"; import { useStdoutToPython } from "@logics/useStdoutToPython";
const startFeedingToWatchDog = () => { const startFeedingToWatchDogController = () => {
const { asyncStdoutToPython } = useStdoutToPython(); const { asyncStdoutToPython } = useStdoutToPython();
setInterval(() => { setInterval(() => {
asyncStdoutToPython("/run/feed_watchdog"); asyncStdoutToPython("/run/feed_watchdog");

View File

@@ -1,11 +1,9 @@
import { useState } from "react"; import { clsx } from "clsx";
import Button from "@mui/material/Button";
import Snackbar from "@mui/material/Snackbar"; import Snackbar from "@mui/material/Snackbar";
import Slide from "@mui/material/Slide"; import Slide from "@mui/material/Slide";
import styles from "./SnackbarController.module.scss"; import styles from "./SnackbarController.module.scss";
import { useNotificationStatus } from "@logics_common"; import { useNotificationStatus } from "@logics_common";
import { clsx } from "clsx";
export const SnackbarController = () => { export const SnackbarController = () => {
const { currentNotificationStatus, closeNotification } = useNotificationStatus(); const { currentNotificationStatus, closeNotification } = useNotificationStatus();