Sanitized mirror from private repository - 2026-04-07 04:58:08 UTC
Some checks failed
Documentation / Build Docusaurus (push) Has been cancelled
Documentation / Deploy to GitHub Pages (push) Has been cancelled

This commit is contained in:
Gitea Mirror Bot
2026-04-07 04:58:08 +00:00
commit 5c08d94e26
1415 changed files with 359812 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
"use client";
import { useState, useEffect } from "react";
export function RefreshIndicator({ interval = 60 }: { interval?: number }) {
const [countdown, setCountdown] = useState(interval);
useEffect(() => {
const timer = setInterval(() => {
setCountdown(prev => prev <= 1 ? interval : prev - 1);
}, 1000);
return () => clearInterval(timer);
}, [interval]);
return (
<span className="text-[9px] text-muted-foreground tabular-nums">
{countdown}s
</span>
);
}