"use client"; import React from "react"; import { cn } from "@/lib/utils"; interface SmoothScrollLinkProps { href: string; children: React.ReactNode; scrolled?: boolean; } const SmoothScrollLink = ({ href, children, scrolled = false, }: SmoothScrollLinkProps) => { const handleClick = (e: React.MouseEvent) => { e.preventDefault(); const targetId = href.replace("#", ""); const section = document.getElementById(targetId); if (section) { const yOffset = -80; const y = section.getBoundingClientRect().top + window.pageYOffset + yOffset; window.scrollTo({ top: y, behavior: "smooth" }); } }; return ( {/* Smooth hover text animation */} {children} {children} ); }; export default SmoothScrollLink;