fix: resolve CI lint errors in Sidebar, TypingIndicator, and useGateway

- Sidebar: replace useEffect setState with callback pattern for filter reset
- TypingIndicator: initialize useRef with 0 instead of impure Date.now()
- TypingIndicator: remove redundant setElapsed(0) from mount effect
- useGateway: remove unused eslint-disable directive
This commit is contained in:
Nicolas Varrot
2026-02-12 11:27:42 +00:00
parent 908dbb4a60
commit 6734b54389
3 changed files with 8 additions and 8 deletions

View File

@@ -12,11 +12,10 @@ function formatElapsed(seconds: number): string {
export function TypingIndicator() {
const t = useT();
const [elapsed, setElapsed] = useState(0);
const startRef = useRef(Date.now());
const startRef = useRef(0);
useEffect(() => {
startRef.current = Date.now();
setElapsed(0);
const interval = setInterval(() => {
setElapsed(Math.floor((Date.now() - startRef.current) / 1000));
}, 1000);