Files
www_projectmycelium_com/src/pages/network/CallToAction.tsx
sasha-astiadi c9335d2c5a 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
2025-11-24 14:40:44 +01:00

84 lines
3.0 KiB
TypeScript

"use client";
import { Container } from '@/components/Container'
import { Button } from "@/components/Button";
import { smoothScrollToElement } from "@/utils/scroll";
export function CallToAction() {
return (
<section className="relative overflow-hidden bg-[#121212]">
{/* ✅ Top horizontal line with spacing */}
<div className="max-w-7xl bg-[#121212] mx-auto py-6 border border-t-0 border-b-0 border-gray-800"></div>
<div className="w-full border-t border-l border-r border-gray-800" />
{/* ✅ Main boxed area */}
<div
id="get-started"
className="relative py-18 max-w-7xl mx-auto overflow-hidden bg-[#111111] border border-t-0 border-b-0 border-gray-800"
>
{/* ✅ Cyan Radial Glow */}
<svg
viewBox="0 0 1024 1024"
aria-hidden="true"
className="absolute top-full left-1/2 w-7xl h-320 -translate-x-1/2 -translate-y-1/2 mask-image mask-[radial-gradient(circle,white,transparent)]"
>
<circle
r={512}
cx={512}
cy={512}
fill="url(#mycelium-cyan-glow)"
fillOpacity="0.3"
/>
<defs>
<radialGradient id="mycelium-cyan-glow">
<stop stopColor="#00e5ff" />
<stop offset="1" stopColor="transparent" />
</radialGradient>
</defs>
</svg>
<Container className="relative">
<div className="mx-auto max-w-3xl text-center">
<h2 className="text-3xl lg:text-4xl font-medium tracking-tight text-white sm:text-4xl">
Choose How You Want to Connect
</h2>
<p className="mt-6 lg:text-lg text-base leading-normal text-gray-300">
Choose How You Want to Connect
Use the network to link environments, deploy workloads, or host nodes to strengthen the mesh and run on your own hardware.
</p>
{/* ✅ Two cards, stacked center with spacing */}
<div className="mt-10 flex flex-wrap justify-center items-center gap-x-6 gap-y-4">
<Button variant="solid" color="cyan" onClick={() => smoothScrollToElement('node-how-it-works', 1200)}
>
Join the Network
</Button>
<Button
as="a"
to="https://myceliumcloud.tf"
variant="outline"
color="white"
target="_blank"
rel="noopener noreferrer"
>
Deploy in Cloud
</Button>
<Button to="/nodes" variant="link" color="white">
Host a Node &rarr;
</Button>
</div>
</div>
</Container>
</div>
{/* ✅ Bottom horizontal line with spacing */}
<div className="w-full border-b border-gray-800" />
<div className="max-w-7xl mx-auto py-6 border border-t-0 border-b-0 border-gray-800 bg-transparent" />
</section>
);
}