From 1b3248ec2e8ba18b9eeadc7baf8ac261df409a04 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 08:15:53 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in 7c38ff4 according to the output from Prettier and StandardJS. Details: None --- .../stateless/ScratchToReveal/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/ScratchToReveal/index.jsx b/src/components/stateless/ScratchToReveal/index.jsx index 29db7930..2f4d405c 100644 --- a/src/components/stateless/ScratchToReveal/index.jsx +++ b/src/components/stateless/ScratchToReveal/index.jsx @@ -135,7 +135,7 @@ const ScratchToReveal = ({ width, height, minScratchPercentage = 50, onComplete, className="absolute top-0 left-0" onMouseDown={handleMouseDown} onTouchStart={handleTouchStart} - > + /> {children} ) diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx index ff2dee63..e0fa1cc4 100644 --- a/src/pages/home/index.jsx +++ b/src/pages/home/index.jsx @@ -284,7 +284,7 @@ const Home = () => { hoverFillColor="#222" /> -
+
@@ -365,14 +365,14 @@ const Home = () => {
-
+
@@ -427,16 +427,16 @@ const Home = () => { mask
-
-
-
-
-
+
+
+
+
@@ -516,20 +516,20 @@ const Home = () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/motion/index.jsx b/src/pages/motion/index.jsx index 6741e1ab..d79953f9 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 = () => { backgroundImage: 'linear-gradient(108deg,#0894ff,#ff2e54 70%,#ff9004)', borderRadius: '3px', transformOrigin: 'left', - 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, }} - > + />