fixed null bug in the park list display

This commit is contained in:
whysman 2025-04-29 22:12:48 -04:00
parent f711c9d610
commit 60af0ad6c6

View File

@ -238,12 +238,12 @@ const LocationScreen: React.FC<LocationScreenProps> = ({ visible, park, setPark,
<Text style={{
fontWeight: "bold",
fontSize: 18,
marginBottom: parks.length > 0 ? 8 : 2,
marginBottom: parks != null ? 8 : 2,
color: theme.colors.primary
}}>
Nearby Dogparks
</Text>
{parks.length > 0 ? (
{ parks != null ? (
<FlatList
data={parks}
keyExtractor={(item) => item.Id}