+4![gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)









Yeuoly
CodingOnStar
Stream
lyzno1
zhsama
Harry
lyzno1
yessenia
hjlarry
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
WTW0313
Copilot
244bd08db2
Signed-off-by: lyzno1 <[email protected]> Co-authored-by: Stream <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: zhsama <[email protected]> Co-authored-by: Harry <[email protected]> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: yessenia <[email protected]> Co-authored-by: hjlarry <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WTW0313 <[email protected]> Co-authored-by: Copilot <[email protected]>
28 lines
719 B
TypeScript
28 lines
719 B
TypeScript
import { useCallback } from 'react'
|
|
import type { PluginTriggerNodeType } from './types'
|
|
import { useAllTriggerPlugins } from '@/service/use-triggers'
|
|
import { useGetLanguage } from '@/context/i18n'
|
|
import { getTriggerCheckParams } from '@/app/components/workflow/utils/trigger'
|
|
|
|
type Params = {
|
|
id: string
|
|
payload: PluginTriggerNodeType
|
|
}
|
|
|
|
const useGetDataForCheckMore = ({
|
|
payload,
|
|
}: Params) => {
|
|
const { data: triggerPlugins } = useAllTriggerPlugins()
|
|
const language = useGetLanguage()
|
|
|
|
const getData = useCallback(() => {
|
|
return getTriggerCheckParams(payload, triggerPlugins, language)
|
|
}, [payload, triggerPlugins, language])
|
|
|
|
return {
|
|
getData,
|
|
}
|
|
}
|
|
|
|
export default useGetDataForCheckMore
|