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

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Dec 9, 2024
1 parent 958a799 commit 2d818ec
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 34 deletions.
79 changes: 53 additions & 26 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import CountUp from 'react-countup'
// 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 @@ -179,7 +179,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 All @@ -192,13 +192,11 @@ const Home = () => {
<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 @@ -257,20 +255,28 @@ 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>
<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 @@ -285,17 +291,17 @@ const Home = () => {
<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 @@ -352,9 +358,7 @@ const Home = () => {
<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 @@ -372,15 +376,38 @@ const Home = () => {
</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
12 changes: 4 additions & 8 deletions src/pages/layout/proTabs/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ const ProTabs = (props) => {
} = theme.useToken()

const renderTabBar = (props, DefaultTabBar) => (
<StickyBox offsetTop={0} style={{ zIndex: 10}}>
<DefaultTabBar
key={nanoid()}
{...props}
className="pro-tabs"
style={{ background: colorBgContainer }}
/>
<StickyBox offsetTop={0} style={{ zIndex: 10 }}>
<DefaultTabBar key={nanoid()} {...props} className="pro-tabs" style={{ background: colorBgContainer }} />
</StickyBox>
)

Expand Down Expand Up @@ -132,7 +127,8 @@ const ProTabs = (props) => {
onTabScroll={onTabScroll}
onEdit={onEdit}
renderTabBar={renderTabBar}
className="layout-container" id="container"
className="layout-container"
id="container"
tabBarStyle={{
zIndex: 2,
}}
Expand Down

0 comments on commit 2d818ec

Please sign in to comment.