diff --git a/web/app/components/base/form/index.stories.tsx b/web/app/components/base/form/index.stories.tsx index c1b9e894e0..f170cb4771 100644 --- a/web/app/components/base/form/index.stories.tsx +++ b/web/app/components/base/form/index.stories.tsx @@ -102,14 +102,14 @@ const FormPlayground = () => { options={{ ...demoFormOpts, validators: { - onSubmit: ({ value }) => { - const result = UserSchema.safeParse(value as typeof demoFormOpts.defaultValues) + onSubmit: ({ value: formValue }) => { + const result = UserSchema.safeParse(formValue as typeof demoFormOpts.defaultValues) if (!result.success) return result.error.issues[0].message return undefined }, }, - onSubmit: ({ value }) => { + onSubmit: () => { setStatus('Successfully saved profile.') }, }} diff --git a/web/app/components/base/input-with-copy/index.tsx b/web/app/components/base/input-with-copy/index.tsx index 0d10714b86..87b7de5005 100644 --- a/web/app/components/base/input-with-copy/index.tsx +++ b/web/app/components/base/input-with-copy/index.tsx @@ -67,7 +67,7 @@ const InputWithCopy = React.forwardRef(( inputProps.className, )} value={value} - {...(({ size, ...rest }) => rest)(inputProps)} + {...(({ size: _size, ...rest }) => rest)(inputProps)} /> {showCopyButton && (
{
{/* Waveform visualization placeholder */}
- {new Array(40).fill(0).map((_, i) => ( + {Array.from({ length: 40 }).map((_, i) => (
> - const fileUpload = useCallback(async (fileItem: FileItem): Promise => { const formData = new FormData() formData.append('file', fileItem.file) diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx index ffaa4ab3a7..c23e022ac5 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx @@ -17,13 +17,11 @@ type SubscriptionTriggerButtonProps = { onClick?: () => void isOpen?: boolean className?: string - onSelect: (v: SimpleSubscription, callback?: () => void) => void } const SubscriptionTriggerButton: React.FC = ({ selectedId, onClick, - onSelect, isOpen = false, className, }) => { @@ -109,7 +107,6 @@ export const SubscriptionSelectorEntry = ({ selectedId, onSelect }: { selectedId={selectedId} onClick={() => setIsOpen(!isOpen)} isOpen={isOpen} - onSelect={onSelect} />
diff --git a/web/app/components/workflow/hooks/use-checklist.ts b/web/app/components/workflow/hooks/use-checklist.ts index 1138385676..f76a06dd5f 100644 --- a/web/app/components/workflow/hooks/use-checklist.ts +++ b/web/app/components/workflow/hooks/use-checklist.ts @@ -151,7 +151,8 @@ export const useChecklist = (nodes: Node[], edges: Edge[]) => { if (node.type === CUSTOM_NODE) { const checkData = getCheckData(node.data) - let { errorMessage } = nodesExtraData![node.data.type]?.checkValid(checkData, t, moreDataForCheckValid) + const validator = nodesExtraData?.[node.data.type as BlockEnum]?.checkValid + let errorMessage = validator ? validator(checkData, t, moreDataForCheckValid).errorMessage : undefined if (!errorMessage) { const availableVars = map[node.id].availableVars diff --git a/web/app/components/workflow/nodes/trigger-plugin/use-config.ts b/web/app/components/workflow/nodes/trigger-plugin/use-config.ts index 6ea711cd31..7e4d6ab716 100644 --- a/web/app/components/workflow/nodes/trigger-plugin/use-config.ts +++ b/web/app/components/workflow/nodes/trigger-plugin/use-config.ts @@ -83,7 +83,7 @@ const useConfig = (id: string, payload: PluginTriggerNodeType) => { const { provider_id, provider_name, - event_name: event_name, + event_name, config = {}, event_parameters: rawEventParameters = {}, subscription_id, diff --git a/web/app/components/workflow/utils/tool.ts b/web/app/components/workflow/utils/tool.ts index 1d5b068e1b..1c3b792d9e 100644 --- a/web/app/components/workflow/utils/tool.ts +++ b/web/app/components/workflow/utils/tool.ts @@ -16,7 +16,7 @@ export const getToolCheckParams = ( workflowTools: ToolWithProvider[], language: string, ) => { - const { provider_id, provider_type, tool_name: tool_name } = toolData + const { provider_id, provider_type, tool_name } = toolData const isBuiltIn = provider_type === CollectionType.builtIn const currentTools = provider_type === CollectionType.builtIn ? buildInTools : provider_type === CollectionType.custom ? customTools : workflowTools const currCollection = currentTools.find(item => canFindTool(item.id, provider_id)) diff --git a/web/service/share.ts b/web/service/share.ts index b19dbc896d..df08f0f3d6 100644 --- a/web/service/share.ts +++ b/web/service/share.ts @@ -295,7 +295,8 @@ export const fetchAccessToken = async ({ userId, appCode }: { userId?: string, a if (accessToken) headers.append('Authorization', `Bearer ${accessToken}`) const params = new URLSearchParams() - userId && params.append('user_id', userId) + if (userId) + params.append('user_id', userId) const url = `/passport?${params.toString()}` return get<{ access_token: string }>(url, { headers }) as Promise<{ access_token: string }> }