From 16d3d4d0196bb9e1618a5b1a8f24609b826e1034 Mon Sep 17 00:00:00 2001 From: Hanno Fellmann Date: Wed, 2 Oct 2024 14:51:11 +0200 Subject: [PATCH] formatting --- .../@mantine/hooks/src/use-in-viewport/use-in-viewport.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@mantine/hooks/src/use-in-viewport/use-in-viewport.ts b/packages/@mantine/hooks/src/use-in-viewport/use-in-viewport.ts index 3a482af3050..3eddd966521 100644 --- a/packages/@mantine/hooks/src/use-in-viewport/use-in-viewport.ts +++ b/packages/@mantine/hooks/src/use-in-viewport/use-in-viewport.ts @@ -1,11 +1,11 @@ -import { useCallback, useRef, useState } from "react"; +import { useCallback, useRef, useState } from 'react'; export function useInViewport() { const observer = useRef(null); const [inViewport, setInViewport] = useState(false); const ref = useCallback((node: T | null) => { - if (typeof IntersectionObserver !== "undefined") { + if (typeof IntersectionObserver !== 'undefined') { if (node && !observer.current) { observer.current = new IntersectionObserver(([entry]) => setInViewport(entry.isIntersecting) @@ -13,7 +13,7 @@ export function useInViewport() { } else { observer.current?.disconnect(); } - + if (node) { observer.current?.observe(node); } else {