Skip to content

Commit b4b79eb

Browse files
committed
cleanup more code
1 parent 325eff5 commit b4b79eb

File tree

1 file changed

+1
-22
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/variables-input

1 file changed

+1
-22
lines changed

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

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,6 @@ export function VariablesInput({
8787
return currentWorkflowVariables.filter((variable) => !otherSelectedIds.has(variable.id))
8888
}
8989

90-
/**
91-
* Get the display name for a variable assignment
92-
* Prioritizes store lookup to ensure we always show the latest name
93-
*/
94-
const getVariableDisplayName = (assignment: VariableAssignment): string => {
95-
// Look up by ID first (source of truth)
96-
if (assignment.variableId) {
97-
const variable = currentWorkflowVariables.find((v) => v.id === assignment.variableId)
98-
return variable?.name || ''
99-
}
100-
101-
// Fallback to stored name (for backwards compatibility)
102-
if (assignment.variableName) {
103-
return assignment.variableName
104-
}
105-
106-
return ''
107-
}
108-
10990
const hasNoWorkflowVariables = currentWorkflowVariables.length === 0
11091
const allVariablesAssigned =
11192
!hasNoWorkflowVariables && getAvailableVariablesFor('new').length === 0
@@ -328,9 +309,7 @@ export function VariablesInput({
328309
disabled={isPreview || disabled}
329310
>
330311
<SelectTrigger className='h-9 border border-input bg-white dark:border-input/60 dark:bg-background'>
331-
<SelectValue placeholder='Select a variable...'>
332-
{getVariableDisplayName(assignment)}
333-
</SelectValue>
312+
<SelectValue placeholder='Select a variable...' />
334313
</SelectTrigger>
335314
<SelectContent>
336315
{(() => {

0 commit comments

Comments
 (0)