diff --git a/app/client/package.json b/app/client/package.json index 49964b784c..34a269370b 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -124,7 +124,7 @@ "react-router-dom": "^5.1.2", "react-scripts": "4.0.1", "react-select": "^3.0.8", - "react-spring": "^8.0.27", + "react-spring": "^9.4.0", "react-syntax-highlighter": "^15.4.4", "react-table": "^7.0.0", "react-tabs": "^3.0.0", @@ -301,4 +301,4 @@ "pre-commit": "lint-staged" } } -} +} \ No newline at end of file diff --git a/app/client/src/comments/AppComments/AppCommentThreadsContainer.tsx b/app/client/src/comments/AppComments/AppCommentThreadsContainer.tsx index 9bb8b2a762..3ed81bcabb 100644 --- a/app/client/src/comments/AppComments/AppCommentThreadsContainer.tsx +++ b/app/client/src/comments/AppComments/AppCommentThreadsContainer.tsx @@ -29,7 +29,7 @@ function AppCommentThreadsContainer({ isOpen }: Props) { }, [isOpen]); return ( - + ); diff --git a/app/client/src/components/ads/DraggableList.tsx b/app/client/src/components/ads/DraggableList.tsx index 6005e71e4d..a22cb86a61 100644 --- a/app/client/src/components/ads/DraggableList.tsx +++ b/app/client/src/components/ads/DraggableList.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useRef } from "react"; import { clamp } from "lodash-es"; import swap from "lodash-move"; import { useDrag } from "react-use-gesture"; -import { useSprings, animated, interpolate } from "react-spring"; +import { useSprings, animated, to } from "react-spring"; import styled from "styled-components"; import { debounce, get } from "lodash"; @@ -132,7 +132,7 @@ function DraggableList(props: any) { style={{ zIndex, width: "100%", - transform: interpolate( + transform: to( [y, scale], (y, s) => `translate3d(0,${y}px,0) scale(${s})`, ), diff --git a/app/client/src/components/ads/ScrollIndicator.tsx b/app/client/src/components/ads/ScrollIndicator.tsx index 7ffc3fafef..da64dd948e 100644 --- a/app/client/src/components/ads/ScrollIndicator.tsx +++ b/app/client/src/components/ads/ScrollIndicator.tsx @@ -1,8 +1,7 @@ import React, { useEffect, useState, useRef } from "react"; import styled from "styled-components"; import _ from "lodash"; -import { animated } from "react-spring"; -import { useSpring, interpolate } from "react-spring"; +import { animated, useSpring, to } from "react-spring"; export const ScrollThumb = styled(animated.div)<{ mode?: "DARK" | "LIGHT"; @@ -125,7 +124,7 @@ function ScrollIndicator({ `translate3d(0px, ${top}%, 0)`, ), diff --git a/app/client/src/components/ads/ShowcaseCarousel.tsx b/app/client/src/components/ads/ShowcaseCarousel.tsx index 765b5022cb..0b649e91e0 100644 --- a/app/client/src/components/ads/ShowcaseCarousel.tsx +++ b/app/client/src/components/ads/ShowcaseCarousel.tsx @@ -98,7 +98,7 @@ export default function ShowcaseCarousel(props: Props) { setCurrentIdx(props.activeIndex); }, [props.activeIndex]); - const transition = useTransition("key", null, { + const transition = useTransition("key", { from: { transform: "translateY(+2%)" }, enter: { transform: "translateY(0%)" }, leave: { transform: "translateY(0%)" }, @@ -132,13 +132,11 @@ export default function ShowcaseCarousel(props: Props) { return ( - {transition.map( - ({ item, props: springProps }: { item: string; props: any }) => ( - - - - ), - )} + {transition((styles, item) => ( + + + + ))}