Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andriy-f committed Feb 8, 2024
1 parent 55f8537 commit 5dee0f4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/features/common/AutoLoadMore.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import debug from 'debug'
import React from 'react'
import React, { Component, PropsWithChildren } from 'react'

import { appName } from '../../consts'

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const log = debug(appName + ':AutoLoadMore.js')

type Props = {
type MyProps = {
hasMore: boolean,
onLoadMore(): void,
children: any,
}

export default class AutoLoadMore extends React.Component<Props> {
type Props = PropsWithChildren<MyProps>

export default class AutoLoadMore extends Component<Props> {
wrapperRef: React.RefObject<HTMLDivElement>
observer: IntersectionObserver | null = null

Expand All @@ -38,7 +39,7 @@ export default class AutoLoadMore extends React.Component<Props> {
}
}

_handleIntersection: IntersectionObserverCallback = (entries, observer) => {
_handleIntersection: IntersectionObserverCallback = (entries) => {
if (entries.some(e => e.isIntersecting)) {
this.props.onLoadMore()
}
Expand Down

0 comments on commit 5dee0f4

Please sign in to comment.