File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
components/dashboard/src/repositories/detail Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const RepositoryNameForm: FC<Props> = ({ project }) => {
22
22
const updateProject = useUpdateProject ( ) ;
23
23
const [ projectName , setProjectName ] = useState ( project . name ) ;
24
24
25
- const nameError = useOnBlurError ( "Sorry, this name is too long." , projectName . length > 32 ) ;
25
+ const nameError = useOnBlurError ( "Sorry, this name is too long." , projectName . length <= 32 ) ;
26
26
27
27
const updateName = useCallback (
28
28
async ( e : React . FormEvent ) => {
@@ -54,7 +54,12 @@ export const RepositoryNameForm: FC<Props> = ({ project }) => {
54
54
/>
55
55
56
56
{ /* Don't disable button, just handle error and message */ }
57
- < Button className = "mt-4" htmlType = "submit" disabled = { project . name === projectName || ! nameError . isValid } >
57
+ < Button
58
+ className = "mt-4"
59
+ htmlType = "submit"
60
+ disabled = { project . name === projectName || ! nameError . isValid }
61
+ loading = { updateProject . isLoading }
62
+ >
58
63
Update Name
59
64
</ Button >
60
65
</ form >
You can’t perform that action at this time.
0 commit comments