Files
wifi-densepose/mobile/src/screens/MATScreen/AlertList.tsx
Yossi Elkrief 47861de821 feat: Phase 4 — Live, Vitals, Zones, MAT, Settings screens
LiveScreen: GaussianSplatWebView + gaussian-splats.html (Three.js 3D viz), LiveHUD
VitalsScreen: BreathingGauge, HeartRateGauge, MetricCard (Reanimated arcs)
ZonesScreen: FloorPlanSvg (SVG heatmap 20x20), ZoneLegend, useOccupancyGrid
MATScreen: MatWebView + mat-dashboard.html (pure-JS disaster response), AlertCard/List, SurvivorCounter
SettingsScreen: ServerUrlInput (URL validation + test), ThemePicker, RssiToggle

Verified: tsc 0 errors, jest passes
2026-03-02 13:00:49 +02:00

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}
/>
);
};