Skip to content

Commit 5392b40

Browse files
authored
Merge pull request #164 from Reveille-Rides/starter-projects/stop-callout-upgrades
show loading indicator properly in stop callout
2 parents af6ed39 + 0898ce9 commit 5392b40

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/components/map/StopCallout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ const StopCallout: React.FC<Props> = ({ stop, tintColor, route, direction }) =>
5050
<AmenityRow amenities={estimate?.amenities || []} color={lightMode.subtitle} size={18}/>
5151
</TouchableOpacity>
5252

53-
{ estimate?.routeDirectionTimes[0]?.nextDeparts.length !== 0 ?
53+
{ isLoading ?
54+
<ActivityIndicator style={{ marginTop: 8 }} />
55+
: ( estimate?.routeDirectionTimes[0]?.nextDeparts.length !== 0 ?
5456
<View style={{
5557
flexDirection: "row",
5658
justifyContent: "center",
@@ -74,8 +76,6 @@ const StopCallout: React.FC<Props> = ({ stop, tintColor, route, direction }) =>
7476
})}
7577
<View style={{flex: 1}} />
7678
</View>
77-
: ( isLoading ?
78-
<ActivityIndicator style={{ marginTop: 8 }} />
7979
:
8080
<Text style={{ marginTop: 8, alignSelf: "center", color: lightMode.subtitle, fontSize: 12 }}>No upcoming departures</Text>
8181
)

0 commit comments

Comments
 (0)