From edd32167d3a4d65f4d11439e73f8385900b89007 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Sat, 17 Feb 2024 18:04:02 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(home):=20minimize?= =?UTF-8?q?=20`Hero`=20scroll=20funtion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/molecules/Hero/Hero.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/molecules/Hero/Hero.tsx b/src/components/molecules/Hero/Hero.tsx index 5858a79..0e7590a 100644 --- a/src/components/molecules/Hero/Hero.tsx +++ b/src/components/molecules/Hero/Hero.tsx @@ -5,12 +5,6 @@ import { EmailIconLink, GitHubIconLink, LinkedInIconLink } from 'components/atom import { ExpandMore } from '@mui/icons-material' const Hero = (props: { scrollTarget?: React.ForwardedRef }) => { - const executeScroll = () => { - if (typeof props.scrollTarget !== 'undefined') { - const target = props.scrollTarget as React.MutableRefObject - target.current?.scrollIntoView() - } - } return ( }) = {props.scrollTarget && ( - + (props.scrollTarget as React.MutableRefObject).current?.scrollIntoView()} + sx={{ position: 'absolute', p: 1, bottom: 3 }}> )}