From 6445d1204dda76186fb3a386f296f09075249d9d Mon Sep 17 00:00:00 2001 From: wil Date: Mon, 18 Mar 2024 17:02:23 -0400 Subject: [PATCH] fix netlify gates --- .../components/ScrubberBar/TrimScrubber.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx b/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx index a79ef3f2f6..579aa3fb7c 100644 --- a/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx +++ b/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx @@ -43,11 +43,12 @@ export const TrimScrubber = ({ useEffect(()=>{ if (trimValues !== null){ const newWidth = calcScrubberWidth(); - if (newWidth !== scrubberWidth){ - setScrubberWidth(newWidth); - } + setScrubberWidth((currWidth)=>{ + if (newWidth !== currWidth) return newWidth; + else return currWidth; + }); } - },[trimValues]); + },[trimValues, calcScrubberWidth]);