Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created September 8, 2021 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/c2293d6609739f1af9ae9da3d343b196 to your computer and use it in GitHub Desktop.
Save velotiotech/c2293d6609739f1af9ae9da3d343b196 to your computer and use it in GitHub Desktop.
<InfiniteScroll
loadMore={this.fetchPhotos}
hasMore={this.state.hasMore}
loader={<div style={{padding:"70px"}} key={0}><LinearProgress color="secondary" /></div>}
>
<div style={{ marginTop: "80px", position: "relative", textAlign: "center" }}>
<div className="image-grid" style={{ marginTop: "30px" }}>
{gallery}
</div>
{this.state.openLightBox ?
<LightBox src={this.state.lightBoxImg} callback={this.closeLightBox} />
: null}
</div>
</InfiniteScroll>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment