import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; interface ErrorViewProps { message: string; onRetry?: () => void; } export const ErrorView: React.FC = ({ message, onRetry }) => ( {message} {onRetry && ( 重试 )} ); const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', padding: 24, }, errorText: { fontSize: 16, color: '#EF5350', textAlign: 'center', marginBottom: 16, }, retryButton: { paddingHorizontal: 24, paddingVertical: 12, backgroundColor: '#1A1A1A', borderRadius: 8, borderWidth: 1, borderColor: '#EF5350', }, retryText: { fontSize: 14, color: '#EF5350', fontWeight: '600', }, });