Add activity indicator for StartPlan

This commit is contained in:
Brandon Presley 2023-11-14 14:56:58 +13:00
parent 8ee07823aa
commit 976bb7c189
1 changed files with 9 additions and 2 deletions

View File

@ -7,7 +7,12 @@ import {
} from "@react-navigation/native"; } from "@react-navigation/native";
import { useCallback, useMemo, useRef, useState } from "react"; import { useCallback, useMemo, useRef, useState } from "react";
import { FlatList, NativeModules, TextInput, View } from "react-native"; import { FlatList, NativeModules, TextInput, View } from "react-native";
import { Button, IconButton, ProgressBar } from "react-native-paper"; import {
ActivityIndicator,
Button,
IconButton,
ProgressBar,
} from "react-native-paper";
import AppInput from "./AppInput"; import AppInput from "./AppInput";
import { StackParams } from "./AppStack"; import { StackParams } from "./AppStack";
import { getBestSet } from "./best.service"; import { getBestSet } from "./best.service";
@ -204,7 +209,9 @@ export default function StartPlan() {
label="Unit" label="Unit"
/> />
)} )}
{counts && ( {counts === undefined ? (
<ActivityIndicator />
) : (
<FlatList <FlatList
data={counts} data={counts}
keyExtractor={(count) => count.name} keyExtractor={(count) => count.name}