Wait for data before displaying workouts on plans

Closes #92
This commit is contained in:
Brandon Presley 2022-10-16 17:20:13 +13:00
parent c05a76ed1a
commit ae947d5405
1 changed files with 23 additions and 20 deletions

View File

@ -166,6 +166,7 @@ export default function StartPlan() {
innerRef={unitRef}
/>
)}
{counts && distinctSets && (
<FlatList
data={workouts}
renderItem={({item, index}) => (
@ -174,7 +175,8 @@ export default function StartPlan() {
description={getDescription(item)}
onPress={() => select(index)}
left={() => (
<View style={{alignItems: 'center', justifyContent: 'center'}}>
<View
style={{alignItems: 'center', justifyContent: 'center'}}>
<RadioButton
onPress={() => select(index)}
value={index.toString()}
@ -186,6 +188,7 @@ export default function StartPlan() {
/>
)}
/>
)}
</View>
<Button mode="contained" icon="save" onPress={handleSubmit}>
Save