From 9a6f4b4de3bfe38b10a7abc87ec41ae09f1a4d3b Mon Sep 17 00:00:00 2001 From: David Pietrzykowski <28998999+davidpdd@users.noreply.github.com> Date: Fri, 22 Apr 2022 17:16:02 +0100 Subject: [PATCH] Remove reference to window to fix ssr error --- src/components/scrolling-carousel/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/scrolling-carousel/index.tsx b/src/components/scrolling-carousel/index.tsx index 1f8d839..22c522d 100644 --- a/src/components/scrolling-carousel/index.tsx +++ b/src/components/scrolling-carousel/index.tsx @@ -109,7 +109,7 @@ export const ScrollingCarousel: FunctionComponent = ({ const smoothHorizontalScroll = (time: number, amount: number, start: number) => { let curTime = 0; for (let scrollCounter = 0; curTime <= time; scrollCounter++) { - window.setTimeout( + setTimeout( smoothHorizontalScrollBehavior, curTime, (scrollCounter * amount) / 100 + start,