fix: only workflow use trigger api (#25443)

This commit is contained in:
lyzno1 2025-09-09 23:14:10 +08:00 committed by GitHub
parent 5a15419baf
commit e74962272e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ const WorkflowAppWithAdditionalContext = () => {
const { setTriggerStatuses } = useTriggerStatusStore()
const appDetail = useAppStore(s => s.appDetail)
const appId = appDetail?.id
const { data: triggersResponse } = useAppTriggers(appId, {
enabled: !!appId,
const isWorkflowMode = appDetail?.mode === 'workflow'
const { data: triggersResponse } = useAppTriggers(isWorkflowMode ? appId : undefined, {
staleTime: 5 * 60 * 1000, // 5 minutes cache
refetchOnWindowFocus: false,
})