/
index.js
34 lines (33 loc) · 970 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Image from 'next/image'
import img from '../public/test.jpg'
import { WindowScroller, List as VirtualizedList } from 'react-virtualized'
export default function Home() {
return (
<div>
<WindowScroller serverHeight={800}>
{({ height, isScrolling, onChildScroll, scrollTop }) => (
<VirtualizedList
autoHeight
height={height}
isScrolling={isScrolling}
onScroll={onChildScroll}
scrollTop={scrollTop}
width={810}
rowCount={5}
estimatedRowSize={10}
rowHeight={400}
rowRenderer={() => {
return (
<div>
<Image src={img} placeholder="blur" className="thumbnail" />
<Image src={img} className="large" />
</div>
)
}}
overscanRowCount={0}
/>
)}
</WindowScroller>
</div>
)
}