few cosmetic fixes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user