fix(quick-connect): add initial valaues to useRef for React 19 compatibility

This commit is contained in:
fallenbagel
2026-06-09 18:58:29 +08:00
parent 7d2d839aa8
commit d0753dcb6b

View File

@@ -27,7 +27,7 @@ export const useQuickConnect = ({
const [isExpired, setIsExpired] = useState(false);
const [errorMessage, setErrorMessage] = useState<string | null>(null);
const pollingInterval = useRef<NodeJS.Timeout>();
const pollingInterval = useRef<NodeJS.Timeout | undefined>(undefined);
const isMounted = useRef(true);
const hasInitiated = useRef(false);
const errorCount = useRef(0);