1
Fork 0

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:
viktorstrate 2020-09-28 16:56:35 +02:00
parent 885748905a
commit bba82538fc
1 changed files with 1 additions and 6 deletions

View File

@ -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>