Skip to content

Commit 2c433d0

Browse files
committed
remove redundant checks
1 parent 0d99938 commit 2c433d0

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/file-selector

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/file-selector/file-selector-input.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export function FileSelectorInput({
137137
collaborativeSetSubblockValue(blockId, subBlock.id, val)
138138
}}
139139
label={subBlock.placeholder || 'Select Google Calendar'}
140-
disabled={finalDisabled || !credential}
140+
disabled={finalDisabled}
141141
showPreview={true}
142142
credentialId={credential}
143143
workflowId={workflowIdFromUrl}
@@ -164,7 +164,7 @@ export function FileSelectorInput({
164164
botToken={botToken}
165165
serverId={serverId}
166166
label={subBlock.placeholder || 'Select Discord channel'}
167-
disabled={finalDisabled || !botToken || !serverId}
167+
disabled={finalDisabled}
168168
showPreview={true}
169169
/>
170170
</div>
@@ -196,7 +196,7 @@ export function FileSelectorInput({
196196
requiredScopes={subBlock.requiredScopes || []}
197197
serviceId={subBlock.serviceId}
198198
label={subBlock.placeholder || 'Select Confluence page'}
199-
disabled={finalDisabled || !domain}
199+
disabled={finalDisabled}
200200
showPreview={true}
201201
credentialId={credential}
202202
workflowId={workflowIdFromUrl}
@@ -236,9 +236,7 @@ export function FileSelectorInput({
236236
requiredScopes={subBlock.requiredScopes || []}
237237
serviceId={subBlock.serviceId}
238238
label={subBlock.placeholder || 'Select Jira issue'}
239-
disabled={
240-
finalDisabled || !domain || !credential || !((projectIdValue as string) || '')
241-
}
239+
disabled={finalDisabled}
242240
showPreview={true}
243241
credentialId={credential}
244242
projectId={(projectIdValue as string) || ''}
@@ -268,7 +266,7 @@ export function FileSelectorInput({
268266
requiredScopes={subBlock.requiredScopes || []}
269267
serviceId={subBlock.serviceId}
270268
label={subBlock.placeholder || 'Select Microsoft Excel file'}
271-
disabled={finalDisabled || !credential}
269+
disabled={finalDisabled}
272270
showPreview={true}
273271
workflowId={activeWorkflowId || ''}
274272
credentialId={credential}
@@ -298,7 +296,7 @@ export function FileSelectorInput({
298296
requiredScopes={subBlock.requiredScopes || []}
299297
serviceId={subBlock.serviceId}
300298
label={subBlock.placeholder || 'Select Microsoft Word document'}
301-
disabled={finalDisabled || !credential}
299+
disabled={finalDisabled}
302300
showPreview={true}
303301
/>
304302
</div>
@@ -325,7 +323,7 @@ export function FileSelectorInput({
325323
requiredScopes={subBlock.requiredScopes || []}
326324
serviceId={subBlock.serviceId}
327325
label={subBlock.placeholder || 'Select OneDrive folder'}
328-
disabled={finalDisabled || !credential}
326+
disabled={finalDisabled}
329327
showPreview={true}
330328
workflowId={activeWorkflowId || ''}
331329
credentialId={credential}

0 commit comments

Comments
 (0)