Files
StevenandGitHub 241195ddd6 BREAKING CHANGE: Rename next/image to next/legacy/image & rename next/future/image to next/image (#41399)
This PR introduces breaking changes by renaming components.

- Rename `next/image` to `next/legacy/image`
- Rename `next/future/image` to `next/image`

The diff is very confusing because both components are very similar so git got confused.
2022-10-14 01:59:22 +00:00

35 lines
970 B
JavaScript

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>
)
}