- 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
38 lines
830 B
TypeScript
38 lines
830 B
TypeScript
import { View, Text, StyleSheet } from 'react-native';
|
|
|
|
interface EmptyStateProps {
|
|
title?: string;
|
|
message?: string;
|
|
}
|
|
|
|
export function EmptyState({
|
|
title = 'No Data',
|
|
message = 'There is nothing to show here yet.'
|
|
}: EmptyStateProps) {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.title}>{title}</Text>
|
|
<Text style={styles.message}>{message}</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
padding: 24,
|
|
},
|
|
title: {
|
|
fontSize: 18,
|
|
fontWeight: 'bold',
|
|
color: '#333333',
|
|
marginBottom: 8,
|
|
},
|
|
message: {
|
|
fontSize: 16,
|
|
color: '#666666',
|
|
textAlign: 'center',
|
|
},
|
|
});
|