From 0cf7e8bb365b202043299ef06105f8621eb390b1 Mon Sep 17 00:00:00 2001 From: ChisatoNishikigi73 Date: Sun, 29 Sep 2024 13:06:14 +0800 Subject: [PATCH] review: Complete review of pullrequest #2 --- arknights.config.tsx | 10 ++++++++++ src/components/Init.tsx | 11 +++++------ src/components/SvgIcons.tsx | 14 +++++--------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/arknights.config.tsx b/arknights.config.tsx index d52e916..146f8ed 100644 --- a/arknights.config.tsx +++ b/arknights.config.tsx @@ -116,5 +116,15 @@ export default { ], }, }, + WORLD: { + items: [ + {title: "源石", subTitle: "ORIGINIUMS", imageUrl: "/images/03-world/originiums.png", description: '大地被起因不明的天灾四处肆虐,经由天灾卷过的土地上出现了大量的神秘矿物——"源石"。依赖于技术的进步,源石蕴含的能量投入工业后使得文明顺利迈入现代,与此同时,源石本身也催生出"感染者"的存在。'}, + {title: "源石技艺", subTitle: "ORIGINIUM ARTS", imageUrl: "/images/03-world/originium_arts.png", description: "源石技艺的描述..."}, + {title: "整合运动", subTitle: "REUNION", imageUrl: "/images/03-world/reunion.png", description: "整合运动的描述..."}, + {title: "感染者", subTitle: "INFECTED", imageUrl: "/images/03-world/infected.png", description: "感染者的描述..."}, + {title: "移动城邦", subTitle: "NOMADIC CITY", imageUrl: "/images/03-world/nomadic_city.png", description: "移动城邦的描述..."}, + {title: "罗德岛", subTitle: "RHODES ISLAND", imageUrl: "/images/03-world/rhodes_island.png", description: "罗德岛的描述..."}, + ], + }, }, } as ArknightsConfig diff --git a/src/components/Init.tsx b/src/components/Init.tsx index 7947963..c19a274 100644 --- a/src/components/Init.tsx +++ b/src/components/Init.tsx @@ -86,20 +86,20 @@ export function Init() { }, [incrementProgress, loadedResources, stopObserving, isObserving]); useEffect(() => { - let interval: NodeJS.Timeout; + let interval: number; if ($isInitialized && progress < 100) { - interval = setInterval(() => { + interval = window.setInterval(() => { setProgress(prevProgress => { const newProgress = prevProgress + 100; if (newProgress >= 100) { - clearInterval(interval); + window.clearInterval(interval); return 100; } return newProgress; }); }, 50); } - return () => clearInterval(interval); + return () => window.clearInterval(interval); }, [$isInitialized, progress]); useEffect(() => { @@ -139,8 +139,7 @@ export function Init() {
diff --git a/src/components/SvgIcons.tsx b/src/components/SvgIcons.tsx index 884459e..d0b830f 100644 --- a/src/components/SvgIcons.tsx +++ b/src/components/SvgIcons.tsx @@ -3,8 +3,7 @@ import React from "react"; export function SvgDefs() { return - // TODO: Maybe remove default color fill for other SVGs as well - @@ -95,17 +94,14 @@ export function SvgDefs() { } -export interface SvgIconProps extends React.SVGProps { +export interface SvgIconProps { className?: React.ComponentProps<"svg">["className"] style?: React.CSSProperties - onClick?: () => void - color?: string } export function TitleArknights(props: SvgIconProps) { - const { color, ...otherProps } = props; - return - + return + } @@ -123,7 +119,7 @@ export function CopyrightMini(props: SvgIconProps) { } export function IconArrow(props: SvgIconProps) { - return + return }