diff --git a/src/pages/portifolio.tsx b/src/pages/portifolio.tsx index 18d1363e..25228503 100644 --- a/src/pages/portifolio.tsx +++ b/src/pages/portifolio.tsx @@ -1,3 +1,4 @@ +import { useEffect, useState } from 'react' import { AboutSection } from 'src/components/portifolio/AboutSection' import { ContactSection } from 'src/components/portifolio/ContactSection' import { Header } from 'src/components/portifolio/Header' @@ -6,9 +7,22 @@ import { KnowledgeSection } from 'src/components/portifolio/KnowledgeSection' import { ProjectsSection } from 'src/components/portifolio/ProjectsSection' function Portifolio() { + const [scrollPosition, setScrollPosition] = useState(0) + + function updateScrollPosition() { + if (window) { + setScrollPosition(window.scrollY) + } + } + + useEffect(() => { + if (window) + window.addEventListener('scroll', updateScrollPosition, { passive: true }) + }, []) + return (
-
+