import { useState, useEffect } from "react"; import styles from "./SplashComponent.module.scss"; import { StartUpProgressContainer } from "./start_up_progress_container/StartUpProgressContainer"; import { DownloadModelsContainer } from "./download_models_container/DownloadModelsContainer"; import MegaphoneSvg from "@images/megaphone.svg?react"; import XMarkSvg from "@images/cancel.svg?react"; import { useWindow } from "@logics_common"; import clsx from "clsx"; export const SplashComponent = () => { return (
); }; const SHOW_MEGAPHONE_TIME = 500; const AnnouncementsContainer = () => { const labels = ["Check the Latest Status", "最新の状況を確認"]; const [is_shown, setIsShown] = useState(0); const [currentLabelIndex, setCurrentLabelIndex] = useState(0); const [is_labels_active, setIsLabelsActive] = useState(false); useEffect(() => { const showTimeout = setTimeout(() => { setIsShown(true); }, SHOW_MEGAPHONE_TIME); const labelsTimeout = setTimeout(() => { setIsLabelsActive(true); }, SHOW_MEGAPHONE_TIME + 15000); let labelInterval; if (is_labels_active) { labelInterval = setInterval(() => { setCurrentLabelIndex((prevIndex) => (prevIndex + 1) % labels.length); }, 4000); } return () => { clearTimeout(showTimeout); clearTimeout(labelsTimeout); if (labelInterval) clearInterval(labelInterval); }; }, [is_labels_active, labels.length]); return ( ); }; // Duplicated const CloseButtonContainer = () => { const { asyncCloseApp } = useWindow(); return ( ); };