refactor: update CallToAction "Join the Network" button to use smooth scroll instead of navigation link

- Changed Button from navigation link with to="/network" to onClick handler with smooth scroll behavior
- Added smoothScrollToElement import from @/utils/scroll
- Implemented smooth scroll to #node-how-it-works section with 1200ms duration
- Removed to prop from Button component
This commit is contained in:
2025-11-24 14:40:44 +01:00
parent 6b4c7b3329
commit c9335d2c5a

View File

@@ -2,6 +2,7 @@
import { Container } from '@/components/Container'
import { Button } from "@/components/Button";
import { smoothScrollToElement } from "@/utils/scroll";
export function CallToAction() {
return (
@@ -50,7 +51,8 @@ Use the network to link environments, deploy workloads, or host nodes to strengt
{/* ✅ Two cards, stacked center with spacing */}
<div className="mt-10 flex flex-wrap justify-center items-center gap-x-6 gap-y-4">
<Button to="/network" variant="solid" color="cyan">
<Button variant="solid" color="cyan" onClick={() => smoothScrollToElement('node-how-it-works', 1200)}
>
Join the Network
</Button>