From a2bcbed780c922465a2cbf313005131f07942f0d Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:38:56 +0900 Subject: [PATCH] [Chore] Change the name of functions. Remove and organize some imports. --- src-ui/app/App.jsx | 12 ++++++------ .../app/snackbar_controller/SnackbarController.jsx | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src-ui/app/App.jsx b/src-ui/app/App.jsx index e9d12d08..fd2d8701 100644 --- a/src-ui/app/App.jsx +++ b/src-ui/app/App.jsx @@ -19,9 +19,9 @@ export const App = () => { return (
- + - + @@ -72,7 +72,7 @@ import { useMainFunction, } from "@logics_main"; -const StartPythonFacadeComponent = () => { +const StartPythonController = () => { const { asyncStartPython } = useStartPython(); const hasRunRef = useRef(false); const { asyncFetchFonts } = useAsyncFetchFonts(); @@ -80,7 +80,7 @@ const StartPythonFacadeComponent = () => { useEffect(() => { if (!hasRunRef.current) { asyncStartPython().then(() => { - startFeedingToWatchDog(); + startFeedingToWatchDogController(); asyncFetchFonts(); }).catch((err) => { console.error(err); @@ -104,7 +104,7 @@ const UiLanguageController = () => { import { useStore_MainFunctionsStateMemory } from "@store"; -const ConfigPageCloseTrigger = () => { +const ConfigPageCloseTriggerController = () => { const { currentIsOpenedConfigPage } = useIsOpenedConfigPage(); const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory(); const { @@ -198,7 +198,7 @@ const TransparencyController = () => { }; import { useStdoutToPython } from "@logics/useStdoutToPython"; -const startFeedingToWatchDog = () => { +const startFeedingToWatchDogController = () => { const { asyncStdoutToPython } = useStdoutToPython(); setInterval(() => { asyncStdoutToPython("/run/feed_watchdog"); diff --git a/src-ui/app/snackbar_controller/SnackbarController.jsx b/src-ui/app/snackbar_controller/SnackbarController.jsx index c6433293..dcc8f54a 100644 --- a/src-ui/app/snackbar_controller/SnackbarController.jsx +++ b/src-ui/app/snackbar_controller/SnackbarController.jsx @@ -1,11 +1,9 @@ -import { useState } from "react"; -import Button from "@mui/material/Button"; +import { clsx } from "clsx"; import Snackbar from "@mui/material/Snackbar"; import Slide from "@mui/material/Slide"; import styles from "./SnackbarController.module.scss"; import { useNotificationStatus } from "@logics_common"; -import { clsx } from "clsx"; export const SnackbarController = () => { const { currentNotificationStatus, closeNotification } = useNotificationStatus();