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:
parent
511fc09419
commit
e82f83fa5a
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import type { RefObject } from "react";
|
import type { RefObject } from "react";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import useIntersectionObserver from "../../../hooks/useIntersectionObserver";
|
import { useIntersectionObserver } from "../../../hooks";
|
||||||
import type { LogTabViewModel } from "./logs-view-model";
|
import type { LogTabViewModel } from "./logs-view-model";
|
||||||
|
|
||||||
interface UseStickToBottomProps {
|
interface UseStickToBottomProps {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import type { RefObject } from "react";
|
import type { RefObject } from "react";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import useIntersectionObserver from "../../../hooks/useIntersectionObserver";
|
import { useIntersectionObserver } from "../../../hooks";
|
||||||
import type { LogTabViewModel } from "./logs-view-model";
|
import type { LogTabViewModel } from "./logs-view-model";
|
||||||
|
|
||||||
interface UseStickToBottomProps {
|
interface UseStickToBottomProps {
|
||||||
|
|||||||
@ -10,3 +10,4 @@ export * from "./useInterval";
|
|||||||
export * from "./useMutationObserver";
|
export * from "./useMutationObserver";
|
||||||
export * from "./useResizeObserver";
|
export * from "./useResizeObserver";
|
||||||
export * from "./use-toggle";
|
export * from "./use-toggle";
|
||||||
|
export * from "./useIntersectionObserver";
|
||||||
|
|||||||
@ -37,7 +37,7 @@ interface IntersectionObserverOptions {
|
|||||||
rootMargin?: string;
|
rootMargin?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function useIntersectionObserver(
|
export function useIntersectionObserver(
|
||||||
element: Element | null,
|
element: Element | null,
|
||||||
{
|
{
|
||||||
threshold = 0,
|
threshold = 0,
|
||||||
@ -64,5 +64,3 @@ function useIntersectionObserver(
|
|||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default useIntersectionObserver;
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user