From a22a8ddcc9a3e56ae23ac85f11374096e1b74916 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Mon, 24 Nov 2025 13:29:07 +0100 Subject: [PATCH 1/2] refactor: update navigation links in CallToAction and NodeHero components - Changed CallToAction "Join the Network" button from /network#download to /network - Changed NodeHero "Explore Docs" button from #node-architecture anchor to external ThreeFold hosting FAQ link with target="_blank" --- src/pages/home/CallToAction.tsx | 2 +- src/pages/nodes/NodeHero.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/CallToAction.tsx b/src/pages/home/CallToAction.tsx index 1c5dd3d..9ea5778 100644 --- a/src/pages/home/CallToAction.tsx +++ b/src/pages/home/CallToAction.tsx @@ -51,7 +51,7 @@ export function CallToAction() {

- diff --git a/src/pages/nodes/NodeHero.tsx b/src/pages/nodes/NodeHero.tsx index dc3cd02..709ad17 100644 --- a/src/pages/nodes/NodeHero.tsx +++ b/src/pages/nodes/NodeHero.tsx @@ -40,7 +40,7 @@ export function NodeHero() { > How it works -
From 6b4c7b3329678bd472f3bc60375f68308c6b20e7 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Mon, 24 Nov 2025 14:13:40 +0100 Subject: [PATCH 2/2] refactor: implement smart navigation for "Get Mycelium Connector" button with smooth scroll utility - Added smoothScrollToElement utility function in src/utils/scroll.ts with easeInOutQuad animation and configurable duration - Changed Header and HeaderDark "Get Mycelium Connector" button from static /download link to onClick handler with conditional navigation - Added handleGetConnectorClick function that scrolls to #download section when on /network page, otherwise navigates to /network - Change --- src/components/Header.tsx | 26 ++++++++++++++++++++++--- src/components/HeaderDark.tsx | 26 ++++++++++++++++++++++--- src/components/ui/floating-navbar.tsx | 16 ++++++++++++--- src/pages/network/Hero.tsx | 7 ++++++- src/pages/nodes/NodeHero.tsx | 8 ++------ src/utils/scroll.ts | 28 +++++++++++++++++++++++++++ 6 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 src/utils/scroll.ts diff --git a/src/components/Header.tsx b/src/components/Header.tsx index abbc88d..c651c1e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,5 +1,6 @@ import { useState } from 'react' -import { Link } from 'react-router-dom' +import { Link, useLocation, useNavigate } from 'react-router-dom' +import { smoothScrollToElement } from '@/utils/scroll' import { Container } from './Container' import { Button } from './Button' import pmyceliumLogo from '../images/logos/mainlogo.svg' @@ -9,6 +10,17 @@ import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline' export function Header() { const [mobileMenuOpen, setMobileMenuOpen] = useState(false) + const navigate = useNavigate() + const location = useLocation() + + const handleGetConnectorClick = () => { + if (location.pathname === '/network') { + smoothScrollToElement('download', 1200) + } else { + navigate('/network') + } + } + return (