Skip to content

Commit

Permalink
change: let --> const observer, options
Browse files Browse the repository at this point in the history
  • Loading branch information
klee214 committed Nov 13, 2020
1 parent 7f02f28 commit 6a6e59b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/components/Posts/LoadAutoScroll.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ function LoadMoreButton({ onScroll }) {
// Once the "button" is on the viewport(shown on the window),
// The new posts are updated(call onClick() -- setSize(size + 1) in Posts.jsx --)
useEffect(() => {
let options = {
const options = {
root: null,
threshold: 1.0,
};

let observer = new IntersectionObserver(
const observer = new IntersectionObserver(
(entries) =>
entries.forEach((entry) => {
if (entry.isIntersecting) {
Expand Down

0 comments on commit 6a6e59b

Please sign in to comment.