import React, { useCallback } from 'react'; import { Poll } from 'which-types'; import { WindowScroller, AutoSizer, List } from 'react-virtualized'; import RenderItem from './RenderItem'; interface PropTypes { polls: Poll[]; mutate: (polls: Poll[], refetch: boolean) => void; } const PollsList: React.FC = ({ polls, mutate }) => { const rowRenderer = useCallback(({ index, style, key }) => ( ), [polls, mutate]); return ( {({ height, isScrolling, registerChild, onChildScroll, scrollTop }) => ( {({ width }) => (
)}
)}
); }; export default PollsList;