Skip to content

Commit

Permalink
style: format code with Prettier and StandardJS
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in fd42ce2 according to the output
from Prettier and StandardJS.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Jan 2, 2025
1 parent fd42ce2 commit 243f594
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions src/pages/motion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -226,9 +226,9 @@ const ParallaxVert = () => {
backgroundColor: '#aaa',
borderRadius: '3px',
// scaleX: scrollYProgress,
scaleX: scaleX,
scaleX,
}}
></motion.div>
/>
<motion.div

Check notice on line 232 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
style={{
width: 100,
Expand All @@ -252,7 +252,7 @@ const ParallaxVert = () => {
rotate: 45, // 旋转45度
opacity: 0.5, // 不透明度设置为0.5
}}
></motion.div>
/>
<motion.nav

Check notice on line 256 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.nav
layout
className={styles.nav}
Expand Down Expand Up @@ -300,7 +300,7 @@ const ParallaxVert = () => {
rotate: 0,
x: '200px',
}}
></motion.div>
/>

<motion.div

Check notice on line 305 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
style={{
Expand All @@ -313,9 +313,9 @@ const ParallaxVert = () => {
duration: 2,
}}
variants={animations}
initial={'hidden'}
animate={'show'}
></motion.div>
initial="hidden"
animate="show"
/>
<motion.ul

Check notice on line 319 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.ul
initial="hidden"
animate="visible"
Expand Down Expand Up @@ -366,7 +366,7 @@ const ParallaxVert = () => {
onClick={() => {
setRotate(!isRotated)
}}
></motion.div>
/>
</div>

{/* <div
Expand Down Expand Up @@ -422,7 +422,7 @@ const ParallaxVert = () => {
setIsAnimation(false)
console.log('Completed animating', definition)
}}
></motion.div>
/>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -494,13 +494,10 @@ const ParallaxVert = () => {
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}
></motion.div>
/>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -655,7 +652,7 @@ const ParallaxVert = () => {
backgroundColor: 'white',
borderRadius: 60,
}}
></motion.div>
/>
</motion.div>

<section style={{ fontSize: 30 }}>scrollDirection: {scrollDirection}</section>
Expand All @@ -669,7 +666,7 @@ const ParallaxVert = () => {
x,
rotate,
}}
></motion.div>
/>
<motion.div

Check notice on line 670 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
style={{
width: 200,
Expand All @@ -678,7 +675,7 @@ const ParallaxVert = () => {
borderRadius: '20px',
scaleX,
}}
></motion.div>
/>

<div
style={{
Expand Down Expand Up @@ -791,7 +788,7 @@ const ParallaxVert = () => {
backgroundColor: '#fff',
borderRadius: 10,
}}
></motion.div>
/>
<motion.div

Check notice on line 792 in src/pages/motion/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
layout
style={{
Expand All @@ -800,7 +797,7 @@ const ParallaxVert = () => {
backgroundColor: '#fff',
borderRadius: 10,
}}
></motion.div>
/>
</LayoutGroup>
</motion.div>
</div>
Expand Down

0 comments on commit 243f594

Please sign in to comment.