"use client" import dynamic from 'next/dynamic'; import { Nav } from "@/components/nav"; import { Translations } from "@/i18n/translations"; import { cn } from "@/lib/utils"; import { ReactElement, useEffect, useRef } from "react"; import { useTheme } from "./providers"; import { Skeleton } from './ui/skeleton'; function Section({ id, title, paragraphs, after }: { id: string title: string; paragraphs: ReactElement; after?: ReactElement; }) { return (

{title}

{paragraphs}
{after}
) } function getSource({ src, type }: { src: string; type: 'mp4' | 'webm' | 'ogv' }) { const sourceType = `video/${type}` return [ , , , , , , ]; } function Video({ sourceBase, hidden }: { sourceBase: string; hidden: boolean; }) { const videoRef = useRef(null); useEffect(() => { const handleScroll = () => { if (!videoRef.current || hidden) return; videoRef.current.play(); 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); handleScroll(); return () => window.removeEventListener("scroll", throttledHandleScroll); }, [hidden]); const sources = [...getSource({ src: sourceBase, type: 'mp4' }), ...getSource({ src: sourceBase, type: 'ogv' }), ...getSource({ src: sourceBase, type: 'webm' })] return ( ); } const LazyLeafletMap = dynamic(() => import('./event-map.lazy'), { ssr: false, loading: () => }) export default function LandingPage( { t }: { t: Translations } ) { const { theme } = useTheme() return (
) }