Add activity indicator for SetList

This commit is contained in:
Brandon Presley 2023-11-15 11:19:22 +13:00
parent 6b168cccfe
commit 70a318a0a4
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import {
} from "@react-navigation/native";
import { useCallback, useState } from "react";
import { FlatList } from "react-native";
import { List } from "react-native-paper";
import { List, ActivityIndicator } from "react-native-paper";
import { Like } from "typeorm";
import { StackParams } from "./AppStack";
import DrawerHeader from "./DrawerHeader";
@ -134,8 +134,8 @@ export default function SetList() {
}, [sets, ids]);
const getContent = () => {
if (!settings) return null;
if (sets?.length === 0)
if (!settings || sets === undefined) return <ActivityIndicator />;
if (sets.length === 0)
return (
<List.Item
title="No sets yet"