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

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Nov 4, 2024
1 parent ac12f02 commit c0b8511
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions src/components/stateless/AnimateRipple/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const useRippling = () => {
const { left, top } = e.currentTarget.getBoundingClientRect()
setCoordinates({
x: e.clientX - left,
y: e.clientY - top,
y: e.clientY - top
})

setTimeout(() => {
Expand All @@ -22,7 +22,7 @@ const useRippling = () => {
x,
y,
handleRippleOnClick,
isRippling,
isRippling
}
}

Expand All @@ -35,15 +35,15 @@ const AnimateRipple = ({ children, onClick, ...rest }) => {
}

return (
<button type="button" onClick={handleClick} className={styles.btn} {...rest}>
<button type='button' onClick={handleClick} className={styles.btn} {...rest}>
<span className={styles.content}>{children}</span>
{isRippling && (
<div className={styles['btn-ripple-container']}>
<span
className={styles['btn-ripple']}
style={{
left: x,
top: y,
top: y
}}
/>
</div>
Expand Down
30 changes: 15 additions & 15 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const Home = () => {
[
{
content: text,
role: 'user',
},
role: 'user'
}
],
key,
signal
Expand Down Expand Up @@ -166,22 +166,22 @@ const Home = () => {
I love coding in <AlternatingText alternateText={['javascript', 'typescript', 'rect', 'vue']} />.
</section>
<section style={{ marginBottom: 40 }}>
<AutoLink text="foo bar baz http://example.org bar https://github.com/wkylin/pro-react-admin" />
<AutoLink text='foo bar baz http://example.org bar https://github.com/wkylin/pro-react-admin' />
</section>
<section>
<AvatarCard avatar="https://picsum.photos/seed/picsum/300/160" text="Hi, I'm a developer." />
<AvatarCard avatar='https://picsum.photos/seed/picsum/300/160' text="Hi, I'm a developer." />
</section>
<section>
<IsometricCard text="Lorem ipsum dolor sit amet consectetur adipisicing elit. Corrupti repellat, consequuntur doloribus voluptate esse iure?" />
<IsometricCard text='Lorem ipsum dolor sit amet consectetur adipisicing elit. Corrupti repellat, consequuntur doloribus voluptate esse iure?' />
</section>
<StarRating value={2} />
<LineBordered text="A line bordered text." />
<LineBordered text='A line bordered text.' />
<section style={{ display: 'flex', alignItems: 'center', marginTop: 10, marginBottom: 40 }}>
<Atom /> <Merge /> <GitMerge /> <GitPullRequestArrow />
</section>
<section style={{ marginBottom: 40 }}>
<ScrollAnimation>
<LazyLoadImage src="https://picsum.photos/seed/picsum/300/160" alt="Strawberries" />
<LazyLoadImage src='https://picsum.photos/seed/picsum/300/160' alt='Strawberries' />
</ScrollAnimation>
</section>
<section>
Expand All @@ -200,31 +200,31 @@ const Home = () => {
</section>
<section style={{ marginBottom: 40 }}>
<AnimateOnScreen.FadeIn>
<AvatarCard avatar="https://picsum.photos/seed/picsum/300/160" text="Hi, I'm a developer." />
<AvatarCard avatar='https://picsum.photos/seed/picsum/300/160' text="Hi, I'm a developer." />
</AnimateOnScreen.FadeIn>
</section>
<section style={{ marginBottom: 40 }}>
<AnimateOnScreen.FadeUp>
<img src="https://picsum.photos/360/200.jpg" alt="" />
<img src='https://picsum.photos/360/200.jpg' alt='' />
</AnimateOnScreen.FadeUp>
</section>
<section style={{ marginBottom: 40, width: 360, height: 200 }}>
<AnimateOnScreen.ScaleIn>
<img src="https://picsum.photos/360/200/?blur=2" alt="" />
<img src='https://picsum.photos/360/200/?blur=2' alt='' />
</AnimateOnScreen.ScaleIn>
</section>
<section style={{ marginBottom: 40 }}>
<AnimateRipple>Click Me</AnimateRipple>
</section>

<section style={{ width: 600, margin: '30px 0' }}>
<Input defaultValue={apiKey} placeholder="api key" onChange={changeApiKey} style={{ marginBottom: 20 }} />
<Flex align="center">
<Input defaultValue={apiKey} placeholder='api key' onChange={changeApiKey} style={{ marginBottom: 20 }} />
<Flex align='center'>
<LinearWrap>
<Input.TextArea
ref={textareaRef}
defaultValue={chatText}
placeholder="来,说点什么呗...Meta + Enter发送"
placeholder='来,说点什么呗...Meta + Enter发送'
onChange={changeChatText}
onKeyDown={onInputKeyDown}
autoSize
Expand All @@ -234,13 +234,13 @@ const Home = () => {
<Button
style={{ margin: '0 10px' }}
icon={<SendOutlined rotate={-60} />}
type="primary"
type='primary'
disabled={isStream}
onClick={onSubmit}
>
发送
</Button>
<Button icon={<SendOutlined rotate={-60} />} type="primary" disabled={!isStream} onClick={onStop}>
<Button icon={<SendOutlined rotate={-60} />} type='primary' disabled={!isStream} onClick={onStop}>
停止
</Button>
</Flex>
Expand Down

0 comments on commit c0b8511

Please sign in to comment.