File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export function CompareForm({
3939 } , [ ] ) ;
4040
4141 const canSubmit = Boolean ( username1 . trim ( ) && username2 . trim ( ) && ! loading ) ;
42- const isEmpty = ! username1 . trim ( ) && ! username2 . trim ( ) ;
42+ const isEmpty = ( ! username1 . trim ( ) && ! username2 . trim ( ) ) && ! data ;
4343
4444 const handleSwap = ( ) => {
4545 setUsername1 ( username2 ) ;
@@ -94,7 +94,7 @@ export function CompareForm({
9494 < Button
9595 onClick = { handleSwap }
9696 type = "button"
97- disabled = { ( ! data && isEmpty ) || loading }
97+ disabled = { isEmpty || loading }
9898 title = { t ( "form.swap" ) }
9999 className = "shadow-sm transition-transform hover:-translate-y-0.5"
100100 >
@@ -103,7 +103,7 @@ export function CompareForm({
103103 < Button
104104 onClick = { handleReset }
105105 title = { t ( "form.reset" ) }
106- disabled = { ( ! data && isEmpty ) || loading }
106+ disabled = { isEmpty || loading }
107107 type = "button"
108108 className = "shadow-sm transition-transform hover:-translate-y-0.5"
109109 >
You can’t perform that action at this time.
0 commit comments