Skip to content

Commit

Permalink
preload 5 tracks off screen
Browse files Browse the repository at this point in the history
  • Loading branch information
teticio committed Sep 3, 2021
1 parent 3fcd22a commit 6ba0488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Track.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SpotifyTrackWidget extends PureComponent {
const iframe = (resource) ? resource.read() : null;

return (
<VisibilitySensor offset={{bottom:-80}}>
<VisibilitySensor offset={{top: -5 * 80, bottom: -5 * 80}}>
{({ isVisible }) =>
<iframe
className={highlight ? "highlight" : ""}
Expand Down

0 comments on commit 6ba0488

Please sign in to comment.