fix: lint err

This commit is contained in:
JzoNg 2026-01-21 14:19:09 +08:00
parent 645793c48c
commit c42b78f2d2
2 changed files with 5 additions and 9 deletions

View File

@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { FormInputItem, UserAction } from '../types'
import type { ButtonProps } from '@/app/components/base/button'
import { RiCloseLine } from '@remixicon/react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
@ -46,10 +47,10 @@ const FormContentPreview: FC<FormContentPreviewProps> = ({
content={content}
rehypePlugins={[rehypeVariable, rehypeNotes]}
customComponents={{
variable: ({ node }: any) => (
variable: ({ node }: { node: { properties?: { [key: string]: string } } }) => (
<Variable path={node.properties?.['data-path'] as string} />
),
section: ({ node }: any) => (() => {
section: ({ node }: { node: { properties?: { [key: string]: string } } }) => (() => {
const name = node.properties?.['data-name'] as string
const input = formInputs.find(i => i.output_variable_name === name)
if (!input) {
@ -68,10 +69,10 @@ const FormContentPreview: FC<FormContentPreviewProps> = ({
}}
/>
<div className="mt-3 flex flex-wrap gap-1 py-1">
{userActions.map((action: any) => (
{userActions.map((action: UserAction) => (
<Button
key={action.id}
variant={getButtonStyle(action.button_style) as any}
variant={getButtonStyle(action.button_style) as ButtonProps['variant']}
>
{action.title}
</Button>

View File

@ -3407,11 +3407,6 @@
"count": 2
}
},
"app/components/workflow/nodes/human-input/components/form-content-preview.tsx": {
"ts/no-explicit-any": {
"count": 4
}
},
"app/components/workflow/nodes/human-input/components/form-content.tsx": {
"react-hooks-extra/no-direct-set-state-in-use-effect": {
"count": 1