diff --git a/src/components/ScrollToTop.jsx b/src/components/ScrollToTop.jsx index 7990ed8..6d3ead6 100644 --- a/src/components/ScrollToTop.jsx +++ b/src/components/ScrollToTop.jsx @@ -2,9 +2,16 @@ import { useEffect } from 'react' import { useLocation } from 'react-router-dom' export default function ScrollToTop() { - const { pathname } = useLocation() + const { pathname, hash } = useLocation() useEffect(() => { + if (hash) { + const el = document.querySelector(hash) + if (el) { + el.scrollIntoView({ behavior: 'smooth' }) + return + } + } window.scrollTo(0, 0) - }, [pathname]) + }, [pathname, hash]) return null } diff --git a/src/components/layout/Footer.jsx b/src/components/layout/Footer.jsx index 1ec7be0..4e20a4f 100644 --- a/src/components/layout/Footer.jsx +++ b/src/components/layout/Footer.jsx @@ -72,7 +72,7 @@ const Footer = () => { diff --git a/src/components/layout/Header.jsx b/src/components/layout/Header.jsx index 63d0fd8..882e299 100644 --- a/src/components/layout/Header.jsx +++ b/src/components/layout/Header.jsx @@ -138,7 +138,7 @@ const Header = () => { {/* CTA Button */}
Share a few details and we'll provide clear direction.
- + Request Consultation{industry.name}
{service.shortDesc}
{service.name}