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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
7 changes: 2 additions & 5 deletions src/components/stateless/LinearWrap/index.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from 'react'
import styles from './index.module.less'
const LinearWrap = ({children}) => {
const LinearWrap = ({ children }) => {
return (
<section className={styles.linearWrap}>
<span className={styles.line} />
<span className={styles.line} />
<span className={styles.line} />
<span className={styles.line} />
<section>
{children}
</section>
<section>{children}</section>
</section>
)

}
export default LinearWrap
17 changes: 8 additions & 9 deletions src/pages/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const Home = () => {
[
{
content: text,
role: 'user',
},
role: 'user'
}
],
key,
signal
Expand Down Expand Up @@ -148,29 +148,29 @@ const Home = () => {
<h2>React version: {version}</h2>

<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
style={{width: 300,height: 30}}
style={{ width: 300, height: 30 }}
/>
</LinearWrap>
<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 All @@ -181,7 +181,6 @@ const Home = () => {
<section style={{ textAlign: 'right', color: '#666' }}>{dateTime}</section>
<ReMarkdown markdownText={aiText} isLoading={isStream} />
</section>

</FixTabPanel>
)
}
Expand Down
Loading