diff --git a/src/web-check-live/views/About.tsx b/src/web-check-live/views/About.tsx index 7c10aac..2704d32 100644 --- a/src/web-check-live/views/About.tsx +++ b/src/web-check-live/views/About.tsx @@ -1,4 +1,6 @@ import styled from '@emotion/styled'; +import { useEffect } from 'react'; +import { useLocation } from 'react-router-dom'; import colors from 'web-check-live/styles/colors'; import Heading from 'web-check-live/components/Form/Heading'; @@ -118,6 +120,21 @@ const makeAnchor = (title: string): string => { }; const About = (): JSX.Element => { + const location = useLocation(); + + useEffect(() => { + // Scroll to hash fragment if present + if (location.hash) { + // Add a small delay to ensure the page has fully rendered + setTimeout(() => { + const element = document.getElementById(location.hash.slice(1)); + if (element) { + element.scrollIntoView({ behavior: 'smooth', block: 'start' }); + } + }, 100); + } + }, [location]); + return (
diff --git a/src/web-check-live/views/Home.tsx b/src/web-check-live/views/Home.tsx index 7389821..ce22f5a 100644 --- a/src/web-check-live/views/Home.tsx +++ b/src/web-check-live/views/Home.tsx @@ -278,7 +278,7 @@ const Home = (): JSX.Element => { Supported Checks
@@ -288,7 +288,7 @@ const Home = (): JSX.Element => { - +