fix random error

This commit is contained in:
john 2025-05-20 10:47:21 +02:00
parent 538cdaf8a1
commit 7a6c379e79
3 changed files with 4 additions and 2 deletions

View file

@ -18,7 +18,7 @@ export function useIntersectionLoad(
) {
const observerRef = useRef<IntersectionObserver | null>(null)
const loading = useRef(false)
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)
const timeoutRef = useRef<Timeout | null>(null)
useEffect(() => {
const el = elementRef.current

2
src/types.d.ts vendored
View file

@ -12,6 +12,8 @@ declare global {
interface Window {
$femto: FemtoApp
}
type Timeout = ReturnType<typeof setTimeout>
}
export interface FemtoApp {

View file

@ -12,7 +12,7 @@ export function useRefreshSessionLoop(authService: AuthService) {
return
}
const timeouts: number[] = []
const timeouts: Timeout[] = []
timeouts.push(
setTimeout(async function refreshUser() {