From 5230886b263f0d3f719d1d58a39c0f64d7ef7482 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Sat, 17 Feb 2024 18:06:25 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(home):=20minimize?= =?UTF-8?q?=20`ProjectSpotlight`=20scroll=20funtion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../molecules/ProjectSpotlight/ProjectSpotlight.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx b/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx index f3d01c7..7b6048e 100644 --- a/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx +++ b/src/components/molecules/ProjectSpotlight/ProjectSpotlight.tsx @@ -125,14 +125,6 @@ const Description = (props: Props) => { } const ProjectSpotlight = React.forwardRef((props, ref) => { - const executeScroll = () => { - if (typeof props.scrollTarget !== 'undefined') { - const target = props.scrollTarget as React.MutableRefObject - target.current?.scrollIntoView() - } - } - // run this function from an event handler or an effect to execute scroll - return (
@@ -160,7 +152,7 @@ const ProjectSpotlight = React.forwardRef((props, ref) {props.scrollTarget && ( (props.scrollTarget as React.MutableRefObject).current?.scrollIntoView()} sx={{ position: 'absolute', p: 1, bottom: 2, left: '50%', transform: 'translate(-50%, 0)' }}>