mirror of
https://github.com/ruvnet/RuView.git
synced 2026-08-30 03:55:55 +00:00
- Added IosRssiService to handle synthetic RSSI data for iOS. - Created WebRssiService to simulate RSSI scanning on the web. - Defined shared types for WifiNetwork and RssiService in rssi.service.ts. - Introduced simulation service to generate synthetic sensing data. - Implemented WebSocket service for real-time data handling with reconnection logic. - Established Zustand stores for managing application state related to MAT and pose data. - Developed theme context and utility functions for consistent styling and formatting. - Added type definitions for various application entities including API responses and sensing data. - Created utility functions for color mapping and URL validation. - Configured TypeScript settings for the mobile application.
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { FlatList, View } from 'react-native';
|
|
import { ThemedText } from '@/components/ThemedText';
|
|
import { colors } from '@/theme/colors';
|
|
import { spacing } from '@/theme/spacing';
|
|
import type { Alert } from '@/types/mat';
|
|
import { AlertCard } from './AlertCard';
|
|
|
|
type AlertListProps = {
|
|
alerts: Alert[];
|
|
};
|
|
|
|
export const AlertList = ({ alerts }: AlertListProps) => {
|
|
if (alerts.length === 0) {
|
|
return (
|
|
<View
|
|
style={{
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
padding: spacing.md,
|
|
borderWidth: 1,
|
|
borderColor: colors.border,
|
|
borderRadius: 12,
|
|
backgroundColor: '#111827',
|
|
}}
|
|
>
|
|
<ThemedText preset="bodyMd">No alerts — system nominal</ThemedText>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<FlatList
|
|
data={alerts}
|
|
keyExtractor={(item) => item.id}
|
|
renderItem={({ item }) => <AlertCard alert={item} />}
|
|
contentContainerStyle={{ paddingBottom: spacing.md }}
|
|
showsVerticalScrollIndicator={false}
|
|
removeClippedSubviews={false}
|
|
/>
|
|
);
|
|
};
|