mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-22 14:36:39 +08:00
feat: lint code
This commit is contained in:
@ -19,6 +19,7 @@ const AutoHeightTextarea = forwardRef(
|
||||
{ value, onChange, placeholder, className, minHeight = 36, maxHeight = 96, autoFocus, controlFocus, onKeyDown, onKeyUp }: IProps,
|
||||
outerRef: any,
|
||||
) => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const ref = outerRef || useRef<HTMLTextAreaElement>(null)
|
||||
|
||||
const doFocus = () => {
|
||||
|
||||
@ -18,7 +18,7 @@ export function Markdown(props: { content: string }) {
|
||||
components={{
|
||||
code({ node, inline, className, children, ...props }) {
|
||||
const match = /language-(\w+)/.exec(className || '')
|
||||
return !inline && match
|
||||
return (!inline && match)
|
||||
? (
|
||||
<SyntaxHighlighter
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user