Remove confusing add workout button from plan
This commit is contained in:
parent
008667c3a2
commit
c9adaf59ff
21
EditPlan.tsx
21
EditPlan.tsx
|
@ -102,29 +102,15 @@ export default function EditPlan() {
|
|||
))
|
||||
)}
|
||||
</ScrollView>
|
||||
{names.length === 0 ? (
|
||||
|
||||
<Button
|
||||
disabled={workouts.length === 0 && days.length === 0}
|
||||
mode="contained"
|
||||
onPress={() => {
|
||||
navigation.goBack()
|
||||
navigation.navigate('Workouts', {
|
||||
screen: 'EditWorkout',
|
||||
params: {value: {name: ''}},
|
||||
})
|
||||
}}>
|
||||
Add workout
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
disabled={workouts.length === 0 && days.length === 0}
|
||||
style={{marginTop: MARGIN}}
|
||||
style={styles.button}
|
||||
mode="contained"
|
||||
icon="save"
|
||||
onPress={save}>
|
||||
Save
|
||||
</Button>
|
||||
)}
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
|
@ -135,4 +121,7 @@ const styles = StyleSheet.create({
|
|||
fontSize: 20,
|
||||
marginBottom: MARGIN,
|
||||
},
|
||||
button: {
|
||||
margin: MARGIN * 2,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user