fixed null bug in the park list display
This commit is contained in:
parent
f711c9d610
commit
60af0ad6c6
@ -238,12 +238,12 @@ const LocationScreen: React.FC<LocationScreenProps> = ({ visible, park, setPark,
|
|||||||
<Text style={{
|
<Text style={{
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
marginBottom: parks.length > 0 ? 8 : 2,
|
marginBottom: parks != null ? 8 : 2,
|
||||||
color: theme.colors.primary
|
color: theme.colors.primary
|
||||||
}}>
|
}}>
|
||||||
Nearby Dogparks
|
Nearby Dogparks
|
||||||
</Text>
|
</Text>
|
||||||
{parks.length > 0 ? (
|
{ parks != null ? (
|
||||||
<FlatList
|
<FlatList
|
||||||
data={parks}
|
data={parks}
|
||||||
keyExtractor={(item) => item.Id}
|
keyExtractor={(item) => item.Id}
|
||||||
|
Loading…
Reference in New Issue
Block a user