File tree Expand file tree Collapse file tree 3 files changed +41
-36
lines changed
apps/web/src/views/settings/components Expand file tree Collapse file tree 3 files changed +41
-36
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,18 @@ const UpdateWorkspaceDescriptionForm = ({
80
80
errorMessage = { errors . description ?. message }
81
81
/>
82
82
</ div >
83
- < div >
84
- < Button
85
- onClick = { handleSubmit ( onSubmit ) }
86
- variant = "primary"
87
- disabled = { ! isDirty || updateWorkspaceDescription . isPending }
88
- isLoading = { updateWorkspaceDescription . isPending }
89
- >
90
- { t `Update` }
91
- </ Button >
92
- </ div >
83
+ { isDirty && (
84
+ < div >
85
+ < Button
86
+ onClick = { handleSubmit ( onSubmit ) }
87
+ variant = "primary"
88
+ disabled = { updateWorkspaceDescription . isPending }
89
+ isLoading = { updateWorkspaceDescription . isPending }
90
+ >
91
+ { t `Update` }
92
+ </ Button >
93
+ </ div >
94
+ ) }
93
95
</ div >
94
96
) ;
95
97
} ;
Original file line number Diff line number Diff line change @@ -72,16 +72,18 @@ const UpdateWorkspaceNameForm = ({
72
72
< div className = "mb-4 flex w-full max-w-[325px] items-center gap-2" >
73
73
< Input { ...register ( "name" ) } errorMessage = { errors . name ?. message } />
74
74
</ div >
75
- < div >
76
- < Button
77
- onClick = { handleSubmit ( onSubmit ) }
78
- variant = "primary"
79
- disabled = { ! isDirty || updateWorkspaceName . isPending }
80
- isLoading = { updateWorkspaceName . isPending }
81
- >
82
- { t `Update` }
83
- </ Button >
84
- </ div >
75
+ { isDirty && (
76
+ < div >
77
+ < Button
78
+ onClick = { handleSubmit ( onSubmit ) }
79
+ variant = "primary"
80
+ disabled = { updateWorkspaceName . isPending }
81
+ isLoading = { updateWorkspaceName . isPending }
82
+ >
83
+ { t `Update` }
84
+ </ Button >
85
+ </ div >
86
+ ) }
85
87
</ div >
86
88
) ;
87
89
} ;
Original file line number Diff line number Diff line change @@ -138,22 +138,23 @@ const UpdateWorkspaceUrlForm = ({
138
138
}
139
139
/>
140
140
</ div >
141
- < div >
142
- < Button
143
- onClick = { handleSubmit ( onSubmit ) }
144
- variant = "primary"
145
- disabled = {
146
- ! isDirty ||
147
- updateWorkspaceSlug . isPending ||
148
- checkWorkspaceSlugAvailability . isPending ||
149
- isWorkspaceSlugAvailable ?. isAvailable === false ||
150
- isTyping
151
- }
152
- isLoading = { updateWorkspaceSlug . isPending }
153
- >
154
- { t `Update` }
155
- </ Button >
156
- </ div >
141
+ { isDirty && (
142
+ < div >
143
+ < Button
144
+ onClick = { handleSubmit ( onSubmit ) }
145
+ variant = "primary"
146
+ disabled = {
147
+ updateWorkspaceSlug . isPending ||
148
+ checkWorkspaceSlugAvailability . isPending ||
149
+ isWorkspaceSlugAvailable ?. isAvailable === false ||
150
+ isTyping
151
+ }
152
+ isLoading = { updateWorkspaceSlug . isPending }
153
+ >
154
+ { t `Update` }
155
+ </ Button >
156
+ </ div >
157
+ ) }
157
158
</ div >
158
159
) ;
159
160
} ;
You can’t perform that action at this time.
0 commit comments