mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-16 06:06:11 +01:00
fix: update errors
This commit is contained in:
1 parent
4ff9a2ec7f
commit
c14efe86cc
34 files changed
+217
-280
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { type RefObject, useEffect, useRef } from 'react';
|
||||
import { type RefObject, useEffect, useRef } from "react";
|
||||
|
||||
interface UseIntersectionOptions extends IntersectionObserverInit {
|
||||
disabled: boolean;
|
||||
@@ -7,9 +7,9 @@ interface UseIntersectionOptions extends IntersectionObserverInit {
|
||||
export function useIntersection(
|
||||
callback: () => void,
|
||||
ref: RefObject<HTMLElement>,
|
||||
options?: UseIntersectionOptions,
|
||||
options?: UseIntersectionOptions
|
||||
) {
|
||||
const observer = useRef<IntersectionObserver>();
|
||||
const observer = useRef<IntersectionObserver>(null!);
|
||||
|
||||
useEffect(() => {
|
||||
if (options?.disabled || !ref.current) return;
|
||||
|
||||
Reference in new issue
Block a user