- Add React Query provider and client - Create reusable UI components (Loading, Error, Empty) - Implement custom hooks with fallback data - Integrate hooks into Resources and Community screens - Add pull-to-refresh support - Configure EAS Build profiles and environment variables
28 lines
673 B
TypeScript
28 lines
673 B
TypeScript
import { View, ActivityIndicator, StyleSheet, Text } from 'react-native';
|
|
|
|
interface LoadingStateProps {
|
|
message?: string;
|
|
}
|
|
|
|
export function LoadingState({ message = 'Loading...' }: LoadingStateProps) {
|
|
return (
|
|
<View style={styles.container}>
|
|
<ActivityIndicator size="large" color="#007AFF" />
|
|
{message && <Text style={styles.text}>{message}</Text>}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
padding: 20,
|
|
},
|
|
text: {
|
|
marginTop: 12,
|
|
fontSize: 16,
|
|
color: '#666666',
|
|
},
|
|
});
|