diff --git a/src/components/layout/Navigation.tsx b/src/components/layout/Navigation.tsx index 9afe37b..07cda38 100644 --- a/src/components/layout/Navigation.tsx +++ b/src/components/layout/Navigation.tsx @@ -19,6 +19,13 @@ export default function Navbar({ theme, setTheme }: Props) { 'Contact', ]; + function scrollToSection(section: string): void { + const element = document.getElementById(section); + if (element) { + element.scrollIntoView({ behavior: 'smooth' }); + } + } + return (