From 9fee26f7c8ab748c83dd22e9d10db431fedbcd21 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Thu, 9 Nov 2023 13:20:08 +1300 Subject: [PATCH] Add activity indicator for insights Also update the help descriptions. --- InsightsPage.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/InsightsPage.tsx b/InsightsPage.tsx index bcd557b..94bf668 100644 --- a/InsightsPage.tsx +++ b/InsightsPage.tsx @@ -1,6 +1,6 @@ import { useFocusEffect } from "@react-navigation/native"; import { useCallback, useState } from "react"; -import { ScrollView, View } from "react-native"; +import { ActivityIndicator, ScrollView, View } from "react-native"; import { IconButton, Text } from "react-native-paper"; import AppPieChart from "./AppPieChart"; import Chart from "./Chart"; @@ -125,6 +125,8 @@ export default function InsightsPage() { /> + {weekCounts === undefined && } + {weekCounts?.length > 0 && ( ({ @@ -163,6 +165,8 @@ export default function InsightsPage() { /> + {hourCounts === undefined && } + {hourCounts?.length > 0 && ( hc.count)} @@ -184,8 +188,8 @@ export default function InsightsPage() { setShow={setShowWeek} onOk={() => setShowWeek(false)} > - If your plan expects an equal # of sets each day of the week, then this - pie graph should be evenly sliced. + Are mondays your weak-spot? Find out here. This counts the # of sets you + tend to do based on the day of the week. setShowHour(false)} > If you find yourself giving up on the gym after 5pm, consider starting - earlier! Or vice-versa. + earlier! Or vice-versa. This counts the # of sets you tend to do, based + on what time of day you began your workout. );