actual/packages/loot-design/src/components/hooks.js
Tom French 4c0bd80f24
Enforce linting in loot-design (#233)
* build: add linter to loot-design package

* style: automated fixes

* style: manual linter fixes
2022-09-01 12:47:34 +01:00

15 lines
294 B
JavaScript

import { useEffect, useRef } from 'react';
export function useScrollFlasher() {
let scrollRef = useRef(null);
useEffect(() => {
setTimeout(() => {
if (scrollRef.current) {
scrollRef.current.flashScrollIndicators();
}
}, 1000);
}, []);
return scrollRef;
}