From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +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