"use client" import { Nav } from "@/components/nav" import { translations } from "@/i18n/translations" import { useEffect, useRef } from "react" export default function Home() { const videoRef = useRef(null) const t = translations.pl // For now using Polish, could be made dynamic useEffect(() => { const handleScroll = () => { if (videoRef.current) { const scrolled = window.scrollY; videoRef.current.style.willChange = "transform"; videoRef.current.style.transform = `translateY(${scrolled * 0.5}px)`; videoRef.current.style.willChange = "unset"; } }; const throttledHandleScroll = () => { requestAnimationFrame(handleScroll); }; window.addEventListener('scroll', throttledHandleScroll); return () => window.removeEventListener('scroll', throttledHandleScroll); }, []); return (
) }