Skip to content

Commit

Permalink
Clean up commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Dec 10, 2024
1 parent a440d03 commit aa37b1d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/frontend/components/usa--in-page-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@ import { useState, useEffect } from "react";
import Link from 'next/link'
import { FieldLogo } from './field--logo';

// TODO: Add scrollTo code for long pages when using in page navigation.

export function USAInPageNav({links, logo, logoAbove = true}) {
const [currentLink, setCurrentLink] = useState(links[0].href);
// const [scrollTarget, setScrollTarget] = useState(links[0].href);
// useEffect(() => {
// if (currentLink !== scrollTarget) {
// setScrollTarget(currentLink);
// let id = currentLink;
// if (id.charAt(0) === "#") {
// id = id.substring(1);
// }
// document.getElementById(id).scrollIntoView({behavior: "smooth"})
// }
// }, [currentLink, scrollTarget])

return (
<aside
className="usa-in-page-nav"
Expand Down

0 comments on commit aa37b1d

Please sign in to comment.