Add empty message to Plans
This commit is contained in:
parent
5ad6aeafbf
commit
a0737a3613
|
@ -1,6 +1,6 @@
|
||||||
import React, {useContext, useEffect, useState} from 'react';
|
import React, {useContext, useEffect, useState} from 'react';
|
||||||
import {FlatList, StyleSheet, View} from 'react-native';
|
import {FlatList, StyleSheet, View} from 'react-native';
|
||||||
import {AnimatedFAB, Searchbar} from 'react-native-paper';
|
import {AnimatedFAB, List, Searchbar} from 'react-native-paper';
|
||||||
import {DatabaseContext} from './App';
|
import {DatabaseContext} from './App';
|
||||||
import EditPlan from './EditPlan';
|
import EditPlan from './EditPlan';
|
||||||
import {Plan} from './plan';
|
import {Plan} from './plan';
|
||||||
|
@ -52,6 +52,12 @@ export default function Plans() {
|
||||||
setRefresing(true);
|
setRefresing(true);
|
||||||
refresh().finally(() => setRefresing(false));
|
refresh().finally(() => setRefresing(false));
|
||||||
}}
|
}}
|
||||||
|
ListEmptyComponent={
|
||||||
|
<List.Item
|
||||||
|
title="No plans yet"
|
||||||
|
description="A plan is a list of workouts for certain days."
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditPlan
|
<EditPlan
|
||||||
|
|
Loading…
Reference in New Issue
Block a user