/
DevDenzo
/
ERP
Обзор
Документация
Войти
/
DevDenzo
/
ERP
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/InfiniteScroll/InfiniteScrollTable.jsx
30 строк
852 B
Denis Sklyarskij
Инициализирован репозиторий
14 янв 2026, 23:32
14 янв 2026, 23:32
1df3d47
Код
Авторство
О чём код?
import React from 'react'; import PropTypes from 'prop-types'; import InfiniteScroll from 'react-infinite-scroll-component'; const InfiniteScrollTable = ({ comments, hasMore, fetchComments }) => ( <InfiniteScroll dataLength={comments.length} next={fetchComments} hasMore={hasMore} loader={<></>} endMessage={<></>} > <table></table> </InfiniteScroll> ); InfiniteScrollTable.propTypes = { comments: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.number.isRequired, name: PropTypes.string.isRequired, email: PropTypes.string.isRequired, body: PropTypes.string.isRequired, }) ).isRequired, hasMore: PropTypes.bool.isRequired, fetchComments: PropTypes.func.isRequired, }; export default InfiniteScrollTable;