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 #515

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
79 changes: 53 additions & 26 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,8 +6,8 @@
// import { PinInput } from 'react-input-pin-code'
import SpotlightCard from '@stateless/Spotlight'
import Typewriter from 'typewriter-effect'
import Marquee from "react-fast-marquee"
import Masonry, {ResponsiveMasonry} from "react-responsive-masonry"
import Marquee from 'react-fast-marquee'
import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry'
import FixTabPanel from '@stateless/FixTabPanel'
import TypedText from '@stateless/TypedText'
import ReMarkdown from '@stateless/ReMarkdown'
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 @@ -190,13 +190,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 @@ -255,20 +253,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 @@ -283,17 +289,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 All @@ -317,7 +323,7 @@
<Input defaultValue={apiKey} placeholder="api key" onChange={changeApiKey} style={{ marginBottom: 20 }} />
<Flex align="center">
{/* <LinearWrap> */}
<Input.TextArea

Check notice on line 326 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 Expand Up @@ -350,9 +356,7 @@
<AnimateWave />
</section>
<section style={{ margin: 20 }}>
<ResponsiveMasonry
columnsCountBreakPoints={{350: 1, 750: 2, 900: 6}}
>
<ResponsiveMasonry columnsCountBreakPoints={{ 350: 1, 750: 2, 900: 6 }}>
<Masonry gutter="10px">
<LazyLoadImage src="https://picsum.photos/id/1/300/100" alt="Strawberries" />
<LazyLoadImage src="https://picsum.photos/id/2/300/200" alt="Strawberries" />
Expand All @@ -370,15 +374,38 @@
</section>
<section style={{ margin: 20 }}>
<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>

</FixTabPanel>
)
}
Expand Down
Loading