chore: upgrade to react@19 (#9182)

This commit is contained in:
David Luzar 2025-02-25 19:18:42 +01:00 committed by GitHub
parent 9ee0b8ffcb
commit 31e8476c78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 2774 additions and 2828 deletions

View file

@ -19,16 +19,16 @@ export const collabErrorIndicatorAtom = atom<ErrorIndicator>({
const CollabError = ({ collabError }: { collabError: ErrorIndicator }) => {
const [isAnimating, setIsAnimating] = useState(false);
const clearAnimationRef = useRef<string | number | NodeJS.Timeout>();
const clearAnimationRef = useRef<string | number>(0);
useEffect(() => {
setIsAnimating(true);
clearAnimationRef.current = setTimeout(() => {
clearAnimationRef.current = window.setTimeout(() => {
setIsAnimating(false);
}, 1000);
return () => {
clearTimeout(clearAnimationRef.current);
window.clearTimeout(clearAnimationRef.current);
};
}, [collabError.message, collabError.nonce]);