mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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.
35 lines
970 B
JavaScript
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>
|
|
)
|
|
}
|