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:
parent
11a9aff8b6
commit
11b39b8766
4 changed files with 57 additions and 46 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue