Remove call to react-lazyload forceVisible
This call resulted in all media being loaded at once, which is a huge performance hit with larger libraries
This commit is contained in:
parent
885748905a
commit
bba82538fc
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useContext } from 'react'
|
||||
import React, { useContext } from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { Loader } from 'semantic-ui-react'
|
||||
import { MediaThumbnail, PhotoThumbnail } from './MediaThumbnail'
|
||||
|
@ -6,7 +6,6 @@ import PresentView from './presentView/PresentView'
|
|||
import PropTypes from 'prop-types'
|
||||
import { SidebarContext } from '../sidebar/Sidebar'
|
||||
import MediaSidebar from '../sidebar/MediaSidebar'
|
||||
import { forceVisible } from 'react-lazyload'
|
||||
|
||||
const Gallery = styled.div`
|
||||
display: flex;
|
||||
|
@ -86,10 +85,6 @@ const PhotoGallery = ({
|
|||
return photoElements
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
!loading && forceVisible()
|
||||
}, [loading])
|
||||
|
||||
return (
|
||||
<ClearWrap>
|
||||
<Gallery>
|
||||
|
|
Loading…
Reference in New Issue