Skip to content

Commit 68cfda6

Browse files
committed
remove redundant workflow dropdown code
1 parent e479921 commit 68cfda6

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/dropdown

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/dropdown/dropdown.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Badge } from '@/components/emcn'
33
import { Combobox, type ComboboxOption } from '@/components/emcn/components'
44
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/hooks/use-sub-block-value'
55
import { ResponseBlockHandler } from '@/executor/handlers/response/response-handler'
6-
import { useDisplayNamesStore } from '@/stores/display-names/store'
76

87
/**
98
* Dropdown option type - can be a simple string or an object with label, id, and optional icon
@@ -125,22 +124,6 @@ export function Dropdown({
125124
return evaluatedOptions
126125
}, [fetchOptions, normalizedFetchedOptions, evaluatedOptions])
127126

128-
// Cache workflow names if this is a workflow selector
129-
useEffect(() => {
130-
if (subBlockId !== 'workflowId' || availableOptions.length === 0) return
131-
132-
const workflowMap = availableOptions.reduce<Record<string, string>>((acc, opt) => {
133-
if (typeof opt === 'object' && 'id' in opt && 'label' in opt) {
134-
acc[opt.id] = opt.label
135-
}
136-
return acc
137-
}, {})
138-
139-
if (Object.keys(workflowMap).length > 0) {
140-
useDisplayNamesStore.getState().setDisplayNames('workflows', 'global', workflowMap)
141-
}
142-
}, [subBlockId, availableOptions])
143-
144127
/**
145128
* Convert dropdown options to Combobox format
146129
*/

0 commit comments

Comments
 (0)