1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use named export for useIntersectionObserver

Signed-off-by: alexfront <alex.andreev.email@gmail.com>
This commit is contained in:
alexfront 2022-09-09 10:00:42 +03:00
parent 511fc09419
commit e82f83fa5a
4 changed files with 4 additions and 5 deletions

View File

@ -5,7 +5,7 @@
import type { RefObject } from "react";
import { useEffect } from "react";
import useIntersectionObserver from "../../../hooks/useIntersectionObserver";
import { useIntersectionObserver } from "../../../hooks";
import type { LogTabViewModel } from "./logs-view-model";
interface UseStickToBottomProps {

View File

@ -5,7 +5,7 @@
import type { RefObject } from "react";
import { useEffect } from "react";
import useIntersectionObserver from "../../../hooks/useIntersectionObserver";
import { useIntersectionObserver } from "../../../hooks";
import type { LogTabViewModel } from "./logs-view-model";
interface UseStickToBottomProps {

View File

@ -10,3 +10,4 @@ export * from "./useInterval";
export * from "./useMutationObserver";
export * from "./useResizeObserver";
export * from "./use-toggle";
export * from "./useIntersectionObserver";

View File

@ -37,7 +37,7 @@ interface IntersectionObserverOptions {
rootMargin?: string;
}
function useIntersectionObserver(
export function useIntersectionObserver(
element: Element | null,
{
threshold = 0,
@ -64,5 +64,3 @@ function useIntersectionObserver(
return entry;
}
export default useIntersectionObserver;