mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Refactor: removed default exports.
This commit is contained in:
parent
cd944e14ce
commit
f83a12d6cd
343 changed files with 555 additions and 1046 deletions
|
|
@ -6,6 +6,7 @@ export function useSticky({ enabled = true, threshold = 1 }) {
|
|||
|
||||
useEffect(() => {
|
||||
let observer: IntersectionObserver | undefined;
|
||||
// eslint-disable-next-line no-undef
|
||||
const handler: IntersectionObserverCallback = ([entry]) =>
|
||||
setIsSticky(entry.intersectionRatio < threshold);
|
||||
|
||||
|
|
@ -22,5 +23,3 @@ export function useSticky({ enabled = true, threshold = 1 }) {
|
|||
|
||||
return { ref, isSticky };
|
||||
}
|
||||
|
||||
export default useSticky;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue