From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- app/components/header/account-setting/model-provider-page/provider-added-card/cooldown-timer.tsx | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/header/account-setting/model-provider-page/provider-added-card/cooldown-timer.tsx b/app/components/header/account-setting/model-provider-page/provider-added-card/cooldown-timer.tsx index dea3200..bdf93fe 100644 --- a/app/components/header/account-setting/model-provider-page/provider-added-card/cooldown-timer.tsx +++ b/app/components/header/account-setting/model-provider-page/provider-added-card/cooldown-timer.tsx @@ -19,10 +19,10 @@ [currentTime], ) - const countdownTimeout = useRef<number>(undefined) + const countdownTimeout = useRef<NodeJS.Timeout>() const clearCountdown = useCallback(() => { if (countdownTimeout.current) { - window.clearTimeout(countdownTimeout.current) + clearTimeout(countdownTimeout.current) countdownTimeout.current = undefined } }, []) @@ -31,7 +31,7 @@ const countdown = useCallback(() => { clearCountdown() - countdownTimeout.current = window.setTimeout(() => { + countdownTimeout.current = setTimeout(() => { const now = Date.now() if (now <= targetTime.current) { setCurrentTime(Date.now()) @@ -55,7 +55,7 @@ return displayTime ? ( <Tooltip popupContent={t('common.modelProvider.apiKeyRateLimit', { seconds: displayTime })}> - <SimplePieChart percentage={Math.round(displayTime / 60 * 100)} className='h-3 w-3' /> + <SimplePieChart percentage={Math.round(displayTime / 60 * 100)} className='w-3 h-3' /> </Tooltip> ) : null -- Gitblit v1.8.0