diff --git a/src/components/Reference.tsx b/src/components/Reference.tsx index 56dac26..9c4cf9a 100644 --- a/src/components/Reference.tsx +++ b/src/components/Reference.tsx @@ -35,7 +35,11 @@ const Reference: React.FC = (props) => { const size = useWindowSize(); if(size.width && (size.width <= 900)){ variantsImage = variantEye; - } + } + + const imageTransition = (size.width && (size.width <= 900)) + ? ({ duration: 0.6, ease:'circInOut', type: "spring", bounce: 0.5 }) + : ({ duration: 0.3, ease:'easeOut', type: "spring", bounce: 0.5 }); return (
@@ -57,7 +61,7 @@ const Reference: React.FC = (props) => { initial="hidden" whileInView="visible" viewport={{ once: true }} - transition={{ duration: 0.6, ease:'circInOut', type: "spring", bounce: 0.5 }} + transition={imageTransition} variants={variantsImage} src={image.src} width={image.width}