1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

using SWR in tag list

This commit is contained in:
Fedor Katurov 2022-01-03 12:52:40 +07:00
parent 11a9aff8b6
commit 11b39b8766
4 changed files with 57 additions and 46 deletions

View file

@ -9,6 +9,7 @@ interface IProps extends HTMLAttributes<HTMLDivElement> {
const InfiniteScroll: FC<IProps> = ({ children, hasMore, scrollReactPx, loadMore, ...props }) => {
const ref = useRef<HTMLDivElement>(null);
const onScrollEnd = useCallback(
(entries: IntersectionObserverEntry[]) => {
if (!hasMore || !entries[0].isIntersecting) return;