WellNuo/components/ui/LoadingSpinner.tsx
Sergei a804a82512 Implement Auth, Patients List, and Dashboard
Features:
- Login screen with API integration (credentials endpoint)
- SecureStore for token management
- Patients list with health data display
- Patient dashboard with stats and quick actions
- AI Chat screen (voice_ask API integration)
- Profile screen with logout
- Full error handling and loading states
- WellNuo brand colors and UI components

API Integration:
- Base URL: eluxnetworks.net/function/well-api/api
- Auth: function=credentials
- Chat: function=voice_ask

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-12 12:58:15 -08:00

51 lines
1.1 KiB
TypeScript

import React from 'react';
import { View, ActivityIndicator, Text, StyleSheet } from 'react-native';
import { AppColors, FontSizes, Spacing } from '@/constants/theme';
interface LoadingSpinnerProps {
size?: 'small' | 'large';
color?: string;
message?: string;
fullScreen?: boolean;
}
export function LoadingSpinner({
size = 'large',
color = AppColors.primary,
message,
fullScreen = false,
}: LoadingSpinnerProps) {
const content = (
<>
<ActivityIndicator size={size} color={color} />
{message && <Text style={styles.message}>{message}</Text>}
</>
);
if (fullScreen) {
return <View style={styles.fullScreen}>{content}</View>;
}
return <View style={styles.container}>{content}</View>;
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
padding: Spacing.lg,
},
fullScreen: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: AppColors.background,
},
message: {
marginTop: Spacing.md,
fontSize: FontSizes.base,
color: AppColors.textSecondary,
textAlign: 'center',
},
});