Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Prettier and StandardJS #512

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 51 additions & 21 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { version, useState, useRef } from 'react'

Check failure on line 1 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

ESLint

ESLint: Install the 'eslint' package
import { Input, Flex, Button } from 'antd'
import { SendOutlined } from '@ant-design/icons'
import { Atom, Merge, GitMerge, GitPullRequestArrow } from 'lucide-react'
Expand All @@ -6,7 +6,7 @@
// import { PinInput } from 'react-input-pin-code'
import SpotlightCard from '@stateless/Spotlight'
import Typewriter from 'typewriter-effect'
import Marquee from "react-fast-marquee"
import Marquee from 'react-fast-marquee'
import FixTabPanel from '@stateless/FixTabPanel'
import TypedText from '@stateless/TypedText'
import ReMarkdown from '@stateless/ReMarkdown'
Expand All @@ -27,8 +27,8 @@
import AnimateWave from '@stateless/AnimateWave'
import MeshGradientBackground from '@stateless/MeshGradientBackground'
import TagCloud from '@stateless/TagCloud'
import SlideLinear from '@stateless/SlideLinear'

Check warning on line 30 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused import

Unused ``` import SlideLinear from '@stateless/SlideLinear' ```
import Masonry from '@container/masonryContainer'

Check warning on line 31 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused import

Unused ``` import Masonry from '@container/masonryContainer' ```

import { oneApiChat, prettyObject } from '@utils/aidFn'
import { fireConfetti } from '@utils/confetti'
Expand Down Expand Up @@ -62,7 +62,7 @@
}
}

const [pinValues, setPinValues] = useState(['', '', '', '', '', '', ''])

Check warning on line 65 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused local symbol

Unused constant pinValues

Check warning on line 65 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unused local symbol

Unused constant setPinValues

const onSubmit = () => {
if (chatText.trim() === '') {
Expand Down Expand Up @@ -178,7 +178,7 @@
<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 All @@ -191,13 +191,11 @@
<Atom /> <Merge /> <GitMerge /> <GitPullRequestArrow />
</section>
<section style={{ marginBottom: 40, fontSize: 16 }}>
<h3>
React Animate On Scroll.
</h3>
<h3>React Animate On Scroll.</h3>
<h3>
<AutoLink text="https://motion.dev/ https://gsap.com/ https://www.react-spring.dev/ https://use-gesture.netlify.app/" />
</h3>
<h3 style={{marginBottom: 40}}>
<h3 style={{ marginBottom: 40 }}>
<AutoLink text="https://www.npmjs.com/package/react-animate-on-scroll https://www.npmjs.com/package/react-scroll https://github.com/wellyshen/react-cool-inview" />
</h3>
<ScrollAnimation>
Expand Down Expand Up @@ -256,20 +254,28 @@
<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>
<SpotlightCard className="my-spot" style={{ width: 360, height: 200, color: '#fff' }}>
<section />
</SpotlightCard>
</section>
<section className={styles.box} style={{ marginBottom: 40, width: 360, height: 200, position: 'relative', backgroundColor: 'rgba(0, 0,0, 0.9)', borderRadius:8 }}>
<section className={styles.dotMask}>
我的中国心
</section>
<section
className={styles.box}
style={{
marginBottom: 40,
width: 360,
height: 200,
position: 'relative',
backgroundColor: 'rgba(0, 0,0, 0.9)',
borderRadius: 8,
}}
>
<section className={styles.dotMask}>我的中国心</section>
</section>
<section style={{ marginBottom: 40, height: 200, width: 360, overflow: 'hidden' }}>
<MeshGradientBackground />
Expand All @@ -284,17 +290,17 @@
<section className={styles.watermark}>water mark</section>
mask
</section>
<section style={{ marginBottom: 40 }} >
<button className={styles['button']} onClick={fireConfetti}>
<section style={{ marginBottom: 40 }}>
<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 @@ -331,19 +337,43 @@
<div style={{ width: 200, height: 40, background: '#aaa', margin: '0 10px', borderRadius: 4 }}></div>
</SlideLinear> */}
<Marquee autoFill direction="left" gradient gradientColor="rgba(255, 255, 255, 0.8)">
<div style={{ width: 200, height: 40, lineHeight: '40px', textAlign: 'center', background: '#aaa', margin: '0 10px', borderRadius: 4 }}>React</div>
<div
style={{
width: 200,
height: 40,
lineHeight: '40px',
textAlign: 'center',
background: '#aaa',
margin: '0 10px',
borderRadius: 4,
}}
>
React
</div>
</Marquee>
</section>
<section style={{ margin: 20 }}>
<Marquee autoFill direction="right" gradient gradientColor="rgba(255, 255, 255, 0.8)">
<div style={{ width: 200, height: 40, lineHeight: '40px', textAlign: 'center', background: '#aaa', margin: '0 10px', borderRadius: 4 }}>Vue</div>
<div
style={{
width: 200,
height: 40,
lineHeight: '40px',
textAlign: 'center',
background: '#aaa',
margin: '0 10px',
borderRadius: 4,
}}
>
Vue
</div>
</Marquee>
</section>
<section style={{ width: 600, margin: '30px 0' }}>
<Input defaultValue={apiKey} placeholder="api key" onChange={changeApiKey} style={{ marginBottom: 20 }} />
<Flex align="center">
{/* <LinearWrap> */}
<Input.TextArea

Check notice on line 376 in src/pages/home/index.jsx

View workflow job for this annotation

GitHub Actions / Qodana for JS

Unresolved JSX component

Unresolved component Input.TextArea
ref={textareaRef}
defaultValue={chatText}
placeholder="来,说点什么呗...Meta + Enter发送"
Expand Down
Loading