few cosmetic fixes

This commit is contained in:
2025-05-24 09:00:48 +02:00
parent 443d4b0366
commit 7873321be0
6 changed files with 194 additions and 125 deletions

View File

@@ -1,6 +1,6 @@
import { View, ScrollView, StyleSheet } from "react-native";
import { useEffect } from "react";
import { useTheme, Text, Card } from "react-native-paper";
import {useTheme, Text, Card, ActivityIndicator} from "react-native-paper";
import { useLocalSearchParams } from "expo-router";
import useLocationStore from "@/locationStore";
@@ -19,14 +19,23 @@ export default function Location() {
}
}, [location, loading, fetchLocations]);
if (loading || !location) {
if (loading) {
return (
<View style={styles.container}>
<Text style={styles.text}>Brak lokalizacji - {id}</Text>
</View>
<View style={[styles.container, {backgroundColor: theme.colors.background}]}>
<ActivityIndicator size="large" color={theme.colors.primary}/>
</View>
);
}
if (!location) {
return (
<View style={styles.container}>
<Text style={styles.text}>Brak lokalizacji - {id}</Text>
</View>
);
}
return (
<View style={[styles.container, {backgroundColor: theme.colors.background}]}>
<ScrollView>