From df91f4d46fcbb5a87263788315b3017847b1f13f Mon Sep 17 00:00:00 2001 From: eddy Date: Mon, 20 Jul 2026 17:52:26 +0200 Subject: [PATCH] ui: voeg laad-indicator toe aan Dashboard --- src/screens/DashboardScreen.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/screens/DashboardScreen.tsx b/src/screens/DashboardScreen.tsx index 995b674..78db588 100644 --- a/src/screens/DashboardScreen.tsx +++ b/src/screens/DashboardScreen.tsx @@ -13,15 +13,18 @@ export default function DashboardScreen({ navigation }: Props) { const insets = useSafeAreaInsets() const [latest, setLatest] = useState(null) const [all, setAll] = useState([]) + const [loading, setLoading] = useState(true) useFocusEffect( useCallback(() => { const load = async () => { + setLoading(true) await initDatabase() const allM = await getAllMeasurements() const visible = allM.filter(m => !m.deletedAt) setAll(visible) setLatest(visible.length > 0 ? visible[0] : null) + setLoading(false) } load() }, []) @@ -38,8 +41,14 @@ export default function DashboardScreen({ navigation }: Props) { - - + {loading ? ( + Laden... + ) : ( + <> + + + + )}