From d9f242ea6615fa282028e132829bb353bd3f647d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:10:40 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in 5df95d1 according to the output from Prettier and StandardJS. Details: None --- .../stateless/ContentPlaceholder/index.jsx | 2 +- src/pages/home/index.jsx | 44 +++++++++---------- src/pages/motion/index.jsx | 37 +++++++--------- 3 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/components/stateless/ContentPlaceholder/index.jsx b/src/components/stateless/ContentPlaceholder/index.jsx index 110b23e6..6422d02e 100644 --- a/src/components/stateless/ContentPlaceholder/index.jsx +++ b/src/components/stateless/ContentPlaceholder/index.jsx @@ -26,7 +26,7 @@ const ContentPlaceholder = () => ( variants={{ collapsed: { scale: 0.8 }, open: { scale: 1 } }} initial="collapsed" animate="open" - whileInView={true} + whileInView transition={{ duration: 0.8 }} className={styles.contentPlaceholder} > diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx index 7128f833..2a4f9b41 100644 --- a/src/pages/home/index.jsx +++ b/src/pages/home/index.jsx @@ -190,7 +190,7 @@ const Home = () => {
-
+
@@ -271,14 +271,14 @@ const Home = () => {
-
+
@@ -319,16 +319,16 @@ const Home = () => { mask
-
-
-
-
-
+
+
+
+
@@ -388,20 +388,20 @@ const Home = () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/motion/index.jsx b/src/pages/motion/index.jsx index 1eb379f9..bf169253 100644 --- a/src/pages/motion/index.jsx +++ b/src/pages/motion/index.jsx @@ -71,7 +71,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) @@ -168,9 +168,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}
@@ -575,7 +572,7 @@ const ParallaxVert = () => { x, rotate, }} - > + /> { borderRadius: '20px', scaleX, }} - > + />
{ backgroundColor: '#fff', borderRadius: 10, }} - > + /> { backgroundColor: '#fff', borderRadius: 10, }} - > + />