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

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Dec 26, 2024
1 parent 8c3d5b2 commit 5f5e496
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 42 deletions.
44 changes: 22 additions & 22 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const Home = () => {
<section style={{ marginBottom: 40 }}>
<AutoLink text="foo bar baz http://example.org bar https://github.com/wkylin/pro-react-admin" />
</section>
<section className={styles.line}></section>
<section className={styles.line} />
<section>
<AvatarCard avatar="https://picsum.photos/seed/picsum/300/160" text="Hi, I'm a developer." />
</section>
Expand Down Expand Up @@ -268,14 +268,14 @@ const Home = () => {
<AnimateOnScreen.DiyAnimation
from={{ opacity: 0, transform: 'translate(-100%, 0)' }}
to={{ opacity: 1, transform: 'translate(0, 0)' }}
triggerOnce={true}
triggerOnce
>
<img src="https://picsum.photos/360/200.jpg" alt="" />
</AnimateOnScreen.DiyAnimation>
</section>
<section style={{ marginBottom: 40, display: 'flex' }}>
<SpotlightCard className="my-spot" style={{ width: 360, height: 200, color: '#fff' }}>
<section></section>
<section />
</SpotlightCard>
</section>
<section
Expand Down Expand Up @@ -313,16 +313,16 @@ const Home = () => {
mask
</section>
<section style={{ marginBottom: 40 }}>
<button className={styles['button']} onClick={fireConfetti}>
<button className={styles.button} onClick={fireConfetti}>
<span className={styles['button-label']}>Click Me</span>
</button>
</section>

<section style={{ position: 'relative', margin: '80px 0 160px 100px' }}>
<div className={styles['circle-1']}></div>
<div className={styles['circle-2']}></div>
<div className={styles['circle-3']}></div>
<div className={styles['circle-4']}></div>
<div className={styles['circle-1']} />
<div className={styles['circle-2']} />
<div className={styles['circle-3']} />
<div className={styles['circle-4']} />
</section>

<section style={{ margin: 20 }} className={styles.eHElAY}>
Expand Down Expand Up @@ -382,20 +382,20 @@ const Home = () => {
<section style={{ margin: 20 }}>
<ResponsiveMasonry columnsCountBreakPoints={{ 350: 1, 750: 2, 900: 6 }}>
<Masonry gutter="10px">
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }}></section>
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 100, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 200, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
<section style={{ height: 150, width: 300, border: '1px solid #ccc', background: '#aaa' }} />
</Masonry>
</ResponsiveMasonry>
</section>
Expand Down
37 changes: 17 additions & 20 deletions src/pages/motion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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 @@ -158,9 +158,9 @@ const ParallaxVert = () => {
backgroundColor: '#aaa',
borderRadius: '3px',
// scaleX: scrollYProgress,
scaleX: scaleX,
scaleX,
}}
></motion.div>
/>
<motion.div

Check notice on line 164 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 @@ -184,7 +184,7 @@ const ParallaxVert = () => {
rotate: 45, // 旋转45度
opacity: 0.5, // 不透明度设置为0.5
}}
></motion.div>
/>
<motion.div

Check notice on line 188 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 @@ -196,7 +196,7 @@ const ParallaxVert = () => {
rotate: 0,
x: '200px',
}}
></motion.div>
/>

<motion.div

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

Check notice on line 215 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 @@ -262,7 +262,7 @@ const ParallaxVert = () => {
onClick={() => {
setRotate(!isRotated)
}}
></motion.div>
/>
</div>

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

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

Check notice on line 566 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 @@ -574,7 +571,7 @@ const ParallaxVert = () => {
borderRadius: '20px',
scaleX,
}}
></motion.div>
/>

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

Check notice on line 688 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 @@ -696,7 +693,7 @@ const ParallaxVert = () => {
backgroundColor: '#fff',
borderRadius: 10,
}}
></motion.div>
/>
</LayoutGroup>
</motion.div>
</div>
Expand Down

0 comments on commit 5f5e496

Please sign in to comment.