diff --git a/lawfirm-demos/demo-1/components/Navbar.tsx b/lawfirm-demos/demo-1/components/Navbar.tsx index 62015d3..b58dd08 100644 --- a/lawfirm-demos/demo-1/components/Navbar.tsx +++ b/lawfirm-demos/demo-1/components/Navbar.tsx @@ -1,28 +1,36 @@ 'use client'; +import {useEffect, useState} from 'react'; import Link from 'next/link'; -import {motion} from 'framer-motion'; -import Links from "@/app/Links"; +import Links from '@/app/Links'; export default function Navbar() { + const [scrolled, setScrolled] = useState(false); + + useEffect(() => { + const handleScroll = () => { + setScrolled(window.scrollY > 30); + }; + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, []); + return ( - -
- - Kanzlei Mustermann +
+ + Kanzlei Mustermann -
- Start +
Über uns - Impressum - Datenschutz
- + ); -} \ No newline at end of file +}