Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucastavarex committed Nov 22, 2024
1 parent ebc6ae3 commit f03ecc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/supercentro/components/chapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export function useScrollArrow() {
setShowArrow(false);
clearTimeout(scrollTimeoutRef.current);
const sectionTop = sectionRef.current.offsetTop;
const sectionHeight = sectionRef.current.offsetHeight;
const sectionHeight = sectionRef.current.scrollHeight;
const scrollPosition = window.scrollY + window.innerHeight;
scrollTimeoutRef.current = setTimeout(() => {
if (scrollPosition > sectionTop && scrollPosition < sectionTop + sectionHeight) {
if (scrollPosition < sectionTop + sectionHeight) {
setShowArrow(true);
}
}, 1000);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/supercentro/story.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export default function SuperCentro() {
type="video/mp4"
style={{
position: "sticky",
top: "50%",
transform: "translateY(-50%)",
top: "0",
// top: "50%",
// transform: "translateY(-50%)",
maxHeight: "100vh",
margin: "0 auto",
display: "block",
Expand Down

0 comments on commit f03ecc8

Please sign in to comment.