fix random error
This commit is contained in:
parent
538cdaf8a1
commit
7a6c379e79
3 changed files with 4 additions and 2 deletions
|
@ -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
2
src/types.d.ts
vendored
|
@ -12,6 +12,8 @@ declare global {
|
|||
interface Window {
|
||||
$femto: FemtoApp
|
||||
}
|
||||
|
||||
type Timeout = ReturnType<typeof setTimeout>
|
||||
}
|
||||
|
||||
export interface FemtoApp {
|
||||
|
|
|
@ -12,7 +12,7 @@ export function useRefreshSessionLoop(authService: AuthService) {
|
|||
return
|
||||
}
|
||||
|
||||
const timeouts: number[] = []
|
||||
const timeouts: Timeout[] = []
|
||||
|
||||
timeouts.push(
|
||||
setTimeout(async function refreshUser() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue