From 243f594069633338d45352b130ef6552d4f2f8c8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 08:41:57 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in fd42ce2 according to the output from Prettier and StandardJS. Details: None --- src/pages/motion/index.jsx | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/pages/motion/index.jsx b/src/pages/motion/index.jsx index 436e7e92..dcef9d8a 100644 --- a/src/pages/motion/index.jsx +++ b/src/pages/motion/index.jsx @@ -72,7 +72,7 @@ const easeNames = [ ] const randomSort = (arr) => { - let newArr = [] + const newArr = [] const len = arr.length for (let i = 0; i < len; i++) { const random = Math.floor(Math.random() * arr.length) @@ -226,9 +226,9 @@ const ParallaxVert = () => { backgroundColor: '#aaa', borderRadius: '3px', // scaleX: scrollYProgress, - scaleX: scaleX, + scaleX, }} - > + /> { rotate: 45, // 旋转45度 opacity: 0.5, // 不透明度设置为0.5 }} - > + /> { rotate: 0, x: '200px', }} - > + /> { duration: 2, }} variants={animations} - initial={'hidden'} - animate={'show'} - > + initial="hidden" + animate="show" + /> { onClick={() => { setRotate(!isRotated) }} - > + /> {/*
{ setIsAnimation(false) console.log('Completed animating', definition) }} - > + />
{ onDragStart={(event, info) => console.log(info.point.x, info.point.y)} onDragEnd={(event, info) => console.log(info.point.x, info.point.y)} onDirectionLock={(axis) => console.log('axis', axis)} - dragSnapToOrigin={true} + dragSnapToOrigin // dragConstraints={{ left: 0, right: 300 }} dragConstraints={constraintsRef} - // dragElastic={false} - // dragElastic={0.8} - // dragPropagation={false} - > + />
{ backgroundColor: 'white', borderRadius: 60, }} - > + />
scrollDirection: {scrollDirection}
@@ -669,7 +666,7 @@ const ParallaxVert = () => { x, rotate, }} - > + /> { borderRadius: '20px', scaleX, }} - > + />
{ backgroundColor: '#fff', borderRadius: 10, }} - > + /> { backgroundColor: '#fff', borderRadius: 10, }} - > + />