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={{ <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}