From fca09ce8dc842c9580a10b3c2324c51eb8367c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=A9da?= <127062373+danielcdeda@users.noreply.github.com> Date: Wed, 13 Sep 2023 18:18:09 -0300 Subject: [PATCH] Update Banner.js Added a onClick funcionality to scroll down to connect page --- personal-portfolio/src/components/Banner.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/personal-portfolio/src/components/Banner.js b/personal-portfolio/src/components/Banner.js index a813a6b3d..7c18e4cb2 100644 --- a/personal-portfolio/src/components/Banner.js +++ b/personal-portfolio/src/components/Banner.js @@ -46,7 +46,14 @@ export const Banner = () => { setIndex(prevIndex => prevIndex + 1); } } - + + const scrollToContacts = () => { + const contactsElement = document.getElementById('connect'); + if (contactsElement) { + contactsElement.scrollIntoView({ behavior: 'smooth' }); + } + }; + return (
@@ -58,7 +65,7 @@ export const Banner = () => { Welcome to my Portfolio

{`Hi! I'm Judy`} {text}

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

- + }