File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ function HomePageInner() {
163163 loading = { loading }
164164 reset = { reset }
165165 swapUsers = { swapUsers }
166- data = { Boolean ( data ) }
166+ hasData = { Boolean ( data ) }
167167 />
168168
169169 { loading && skeleton }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type CompareFormProps = {
1616 username2 : string ;
1717 setUsername1 : ( value : string ) => void ;
1818 setUsername2 : ( value : string ) => void ;
19- data ?: boolean ;
19+ hasData ?: boolean ;
2020 onSubmit : ( u1 : string , u2 : string ) => void ;
2121 loading ?: boolean ;
2222 reset ?: ( ) => void ;
@@ -29,6 +29,7 @@ export function CompareForm({
2929 username2,
3030 setUsername1,
3131 setUsername2,
32+ hasData,
3233 onSubmit,
3334 loading,
3435 swapUsers,
@@ -44,7 +45,7 @@ export function CompareForm({
4445 } , [ ] ) ;
4546
4647 const canSubmit = Boolean ( username1 . trim ( ) && username2 . trim ( ) && ! loading ) ;
47- const isEmpty = ( ! username1 . trim ( ) && ! username2 . trim ( ) ) && ! data ;
48+ const isEmpty = ( ! username1 . trim ( ) && ! username2 . trim ( ) ) && ! hasData ;
4849
4950 const handleSwap = ( ) => {
5051 if ( swapUsers ) swapUsers ( ) ;
You can’t perform that action at this time.
0 commit comments