@@ -69,13 +69,16 @@ const HomeScreen = () => {
6969 ) ;
7070
7171 const getHomeWorldEachItem = useCallback ( async ( ) => {
72+
73+
74+
7275 responseListWithoutHomeWorld
7376 . sort ( ( a , b ) => ( String ( a . name ) > String ( b . name ) ? 0 : - 1 ) )
7477 . map ( async ( item ) => {
7578 try {
76- if ( item . homeworld . includes ( 'http ://swapi.dev/api/' ) ) {
79+ if ( item . homeworld . includes ( 'https ://swapi.dev/api/' ) ) {
7780 const replaceURL = item . homeworld . replace (
78- 'http ://swapi.dev/api/' ,
81+ 'https ://swapi.dev/api/' ,
7982 '' ,
8083 ) ;
8184
@@ -126,7 +129,7 @@ const HomeScreen = () => {
126129 < SafeAreaView style = { styles . safeArea } >
127130 < StatusBar barStyle = "light-content" />
128131 < Box flex = { 1 } alignItems = "center" paddingTop = { 'sm' } >
129- < Typography color = { 'primary ' } fontSize = { 'xl' } variant = "bold" >
132+ < Typography color = { 'white ' } fontSize = { 'xl' } variant = "bold" >
130133 STAR WARS API
131134 </ Typography >
132135 < Box
@@ -184,23 +187,26 @@ const HomeScreen = () => {
184187 } }
185188 onEndReachedThreshold = { 0.1 }
186189 ListFooterComponent = { ( ) => {
190+ if ( isFetching ) {
191+ return null ;
192+ }
187193 return (
188194 < Button
189- my = { 3 }
195+ my = { 'sm' }
190196 flexDirection = "row"
191197 width = { WINDOW_DEVICE_WIDTH * 0.8 }
192- backgroundColor = { ! hasNextPage ? 'secondary' : 'primary ' }
198+ backgroundColor = { ! hasNextPage ? 'secondary' : 'grayLight ' }
193199 disabled >
194- { isFetching ? (
200+ { isFetching || hasNextPage ? (
195201 < LottieView
196202 source = { require ( '../../assets/spinner.json' ) }
197203 autoPlay
198204 loop
199205 hardwareAccelerationAndroid = { false }
200206 resizeMode = "contain"
201207 style = { {
202- height : 30 ,
203- width : 30 ,
208+ height : 40 ,
209+ width : 40 ,
204210 } }
205211 />
206212 ) : (
0 commit comments