import React from 'react'; import { Poll } from 'which-types'; import { WindowScroller, AutoSizer, List } from 'react-virtualized'; import PollCard from '../PollCard/PollCard'; import Loading from '../Loading/Loading'; interface PropTypes { polls: Poll[]; } interface RenderPropTypes { index: number; key: string; style: React.CSSProperties; } const Feed: React.FC = ({ polls }) => { const RenderItem: React.FC = ({ index, style, key }) => { const poll = polls[index]; return (
); }; const list = ( {({ height, isScrolling, registerChild, onChildScroll, scrollTop }) => ( {({ width }) => (
)}
)}
); return polls.length ? list : ; }; export default Feed;