diff --git a/client/src/pages/LandingPage.jsx b/client/src/pages/LandingPage.jsx index ac9e589..c43e6db 100644 --- a/client/src/pages/LandingPage.jsx +++ b/client/src/pages/LandingPage.jsx @@ -20,11 +20,20 @@ import { import { useTheme } from "../hooks/useTheme"; import ScrollToTop from "../components/ScrollToTop"; import LanguageToggle from "../components/LanguageToggle"; +import { useRef } from "react"; const LandingPage = () => { const { theme, toggleTheme } = useTheme(); const [isVisible, setIsVisible] = useState({}); const [scrollY, setScrollY] = useState(0); + const sliderRef = useRef(null); + const [sliderWidth, setSliderWidth] = useState(0); + + useEffect(() => { + if (sliderRef.current) { + setSliderWidth(sliderRef.current.scrollWidth / 2); + } + }, []); useEffect(() => { const handleScroll = () => setScrollY(window.scrollY); @@ -559,7 +568,9 @@ const LandingPage = () => {
+ {contributor.commits} commits •{" "} + {contributor.linesAdded} lines +
+