Use named export for useIntersectionObserver

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

No files matched your search

@@ -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 {
+1
View File
@@ -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;