Skip to content

Commit 9acfec2

Browse files
authored
feat: changing button text (#3304)
1 parent 98adaba commit 9acfec2

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/flows/pipes/Schedule/ExportTaskButton.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@ const ExportTaskButton: FC<Props> = ({
102102
return (
103103
<Button
104104
text={text}
105-
color={disabled ? ComponentColor.Default : ComponentColor.Success}
105+
color={ComponentColor.Success}
106106
type={ButtonType.Submit}
107107
onClick={onClick}
108108
status={disabled ? ComponentStatus.Disabled : ComponentStatus.Default}
109109
testID="task-form-save"
110-
style={{opacity: 1}}
111110
icon={IconFont.Export_New}
112111
titleText={text}
113112
/>

src/flows/pipes/Schedule/view.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,21 +301,13 @@ const Schedule: FC<PipeProp> = ({Context}) => {
301301
])
302302
}, [id, data.task])
303303

304-
let taskButtonText = 'Export as Task'
305-
306-
if (isFlagEnabled('removeExportModal')) {
307-
if (hasChanges) {
308-
taskButtonText = 'Export as New Task'
309-
} else {
310-
taskButtonText = 'Task in Sync'
311-
}
312-
}
313-
314304
const persist = (
315305
<ExportTaskButton
316306
generate={generateTask}
317307
onCreate={storeTask}
318-
text={taskButtonText}
308+
text={
309+
isFlagEnabled('removeExportModal') ? 'Export Task' : 'Export as Task'
310+
}
319311
disabled={!hasChanges || !!intervalError || !!offsetError}
320312
type="task"
321313
/>

0 commit comments

Comments
 (0)