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 b7fa021 according to the output
from Prettier and StandardJS.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Dec 20, 2024
1 parent b7fa021 commit 27614f1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ProSecNav = () => {
useEffect(() => {
const selectedPathKey = pathname

Check warning on line 46 in src/pages/layout/proSecNav/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Redundant local variable

Local variable selectedPathKey is redundant
setSelectedKeys([selectedPathKey])
setOpenKeys(isOpenChange ? openKeys : (pathSubmenu[pathname] ?? openKeys))
setOpenKeys(isOpenChange ? openKeys : pathSubmenu[pathname] ?? openKeys)
}, [pathname, openKeys, isOpenChange])

const onOpenChange = (keys) => {
Expand Down
39 changes: 18 additions & 21 deletions src/pages/motion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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 @@ -118,7 +118,7 @@ const ParallaxVert = () => {
rotate: 45, // 旋转45度
opacity: 0.5, // 不透明度设置为0.5
}}
></motion.div>
/>
<motion.div

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

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
transformTemplate={template}
animate={{ rotate: 360 }}
Expand All @@ -130,7 +130,7 @@ const ParallaxVert = () => {
rotate: 0,
x: '200px',
}}
></motion.div>
/>

<motion.div

Check notice on line 135 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 @@ -143,9 +143,9 @@ const ParallaxVert = () => {
duration: 2,
}}
variants={animations}
initial={'hidden'}
animate={'show'}
></motion.div>
initial="hidden"
animate="show"
/>
<motion.ul

Check notice on line 149 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 @@ -196,7 +196,7 @@ const ParallaxVert = () => {
onClick={() => {
setRotate(!isRotated)
}}
></motion.div>
/>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -250,13 +250,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 @@ -333,7 +330,7 @@ const ParallaxVert = () => {
setIsAnimation(false)
console.log('Completed animating', definition)
}}
></motion.div>
/>
<div
style={{
display: 'flex',
Expand Down Expand Up @@ -466,7 +463,7 @@ const ParallaxVert = () => {
duration: 1,
repeat: Infinity,
}}
></motion.div>
/>
</div>

<motion.div

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

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.div
Expand All @@ -491,7 +488,7 @@ const ParallaxVert = () => {
backgroundColor: 'white',
borderRadius: 60,
}}
></motion.div>
/>
</motion.div>

<div
Expand Down Expand Up @@ -582,7 +579,7 @@ const ParallaxVert = () => {
onTap={() => {
setButtonState(!buttonRight)
}}
></motion.div>
/>

<motion.div

Check notice on line 584 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 @@ -602,7 +599,7 @@ const ParallaxVert = () => {
onTap={() => {
setButtonState(!buttonRight)
}}
></motion.div>
/>
<span
style={{
color: '#aaa',
Expand Down Expand Up @@ -661,7 +658,7 @@ const ParallaxVert = () => {
backgroundColor: '#fff',
borderRadius: 10,
}}
></motion.div>
/>
<motion.div

Check notice on line 662 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 @@ -670,7 +667,7 @@ const ParallaxVert = () => {
backgroundColor: '#fff',
borderRadius: 10,
}}
></motion.div>
/>
</LayoutGroup>
</motion.div>
</div>
Expand Down Expand Up @@ -718,7 +715,7 @@ const ParallaxVert = () => {
backgroundColor: 'black',
borderRadius: 60,
}}
></motion.div>
/>
</motion.div>
<motion.span layout>黑点和文字都设置了layout</motion.span>

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

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.span
</div>
Expand Down Expand Up @@ -756,7 +753,7 @@ const ParallaxVert = () => {
backgroundColor: 'black',
borderRadius: 60,
}}
></motion.div>
/>
</motion.div>
<motion.span>黑点和文字都未设置layout</motion.span>

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

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component motion.span
</div>
Expand Down

0 comments on commit 27614f1

Please sign in to comment.