Skip to content

Commit

Permalink
keep mobile in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
carlgunderson committed Jan 7, 2024
1 parent 905d795 commit eb38f8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Section/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ const Section = () => {
// Down
if (activeIdx < jobs.length - 1) {
activeIdxRef.current = activeIdxRef.current + 1
setActiveIdx(prevIdx => prevIdx + 1)
setActiveIdx(activeIdxRef.current)
}
}

if (touchStart - touchEnd < -100) {
// Up
if (activeIdx > 0) {
activeIdxRef.current = activeIdxRef.current - 1
setActiveIdx(prevIdx => prevIdx - 1)
setActiveIdx(activeIdxRef.current)
}
}
}
Expand Down

0 comments on commit eb38f8a

Please sign in to comment.