import React, { memo, FC, useMemo } from 'react' import { IssueFeedCell } from '../general/cells' import { FixedSizeList as List } from 'react-window' import { getListHeight } from './utils' import { PageIssue } from '@app/types' interface RowProps { index: number style?: React.CSSProperties } // base feed props interface LazyIssuesProps { fullScreen?: boolean issues: PageIssue[] pageMatchers?: Set } // List of issues rendered. const LazyIssuesComponent: FC = ({ fullScreen, issues, pageMatchers, }) => { // allow feed adjustment at render for manual triggering const issueCount = issues.length const { size, height } = useMemo( () => getListHeight({ fullScreen, issueCount }), [fullScreen, issueCount] ) const Row = ({ index, style }: RowProps) => { const item = issues[index] return ( ) } if (fullScreen) { return (
{Row}
) } return (
    {Row}
) } export const LazyIssues = memo(LazyIssuesComponent)