@@ -3,6 +3,7 @@ import { motion, AnimatePresence, useScroll, useMotionValueEvent } from 'motion/
33import { Star , Download , Menu , X } from 'lucide-react' ;
44import { useLocation } from 'react-router' ;
55import { Button } from '@/components/ui/button' ;
6+ import { useInstallationTarget } from '@/hooks/use-installation-target' ;
67import { cn } from '@/lib/utils' ;
78import logoFullWhite from '../../assets/logos/mildstack-logo-full-white.png'
89
@@ -36,6 +37,7 @@ export const Navbar: React.FC = () => {
3637 const [ activeSection , setActiveSection ] = useState < string | null > ( 'home' ) ;
3738 const { scrollY } = useScroll ( ) ;
3839 const { pathname } = useLocation ( ) ;
40+ const { installationDocsRoute, installationHref } = useInstallationTarget ( ) ;
3941
4042 const handleSectionClick = (
4143 event : React . MouseEvent < HTMLAnchorElement > ,
@@ -159,7 +161,8 @@ export const Navbar: React.FC = () => {
159161 </ >
160162 ) ;
161163
162- const isDownloadActive = pathname === '/download' ;
164+ const isDownloadActive =
165+ pathname === '/download' || pathname === installationDocsRoute ;
163166
164167 const ActionButtons = ( { isMobile = false , closeMenu } : { isMobile ?: boolean ; closeMenu ?: ( ) => void } ) => (
165168 < >
@@ -172,7 +175,7 @@ export const Navbar: React.FC = () => {
172175 isMobile ? 'px-8 h-12 text-lg w-full max-w-[280px] flex' : 'hidden md:flex h-9 px-4 text-sm hover:text-gray-300'
173176 ) }
174177 >
175- < a href = "/download" onClick = { closeMenu } >
178+ < a href = { installationHref } onClick = { closeMenu } >
176179 < Download className = { isMobile ? 'size-5' : 'size-4' } />
177180 Download
178181 </ a >
0 commit comments