Skip to content

Commit 9a85405

Browse files
committed
style: updated colors
1 parent c201d52 commit 9a85405

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

template/src/components/organisms/CardPeoples.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const CardPeoples = ({ name, homeworld, onPress }: CardPeopleProps) => {
2020
onPress={onPress}
2121
bg={'primary'}
2222
testID="Button">
23-
<Typography color={'secondary'}>{name}</Typography>
24-
<Typography color={'secondary'}>{homeworld}</Typography>
23+
<Typography color={'secondary'} mb='sm'>Name: {name}</Typography>
24+
<Typography color={'secondary'}>HomeWorld: {homeworld}</Typography>
2525
</Button>
2626
</Box>
2727
);

template/src/screens/Home.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)