diff --git a/EditPlan.tsx b/EditPlan.tsx index fd88db8..3b62f09 100644 --- a/EditPlan.tsx +++ b/EditPlan.tsx @@ -10,10 +10,10 @@ import {ScrollView, StyleSheet, View} from 'react-native'; import {Button, IconButton, Text} from 'react-native-paper'; import {MARGIN, PADDING} from './constants'; import {DrawerParamList} from './drawer-param-list'; -import MassiveSwitch from './MassiveSwitch'; import {PlanPageParams} from './plan-page-params'; import {addPlan, updatePlan} from './plan.service'; import {getNames} from './set.service'; +import Switch from './Switch'; import {DAYS} from './time'; export default function EditPlan() { @@ -91,33 +91,28 @@ export default function EditPlan() { Days {DAYS.map(day => ( - - toggleDay(value, day)} - /> - toggleDay(!days.includes(day), day)}> - {day} - - + toggleDay(value, day)} + onPress={() => toggleDay(!days.includes(day), day)} + value={days.includes(day)}> + {day} + ))} Workouts - {names.length === 0 && ( + {names.length === 0 ? ( No workouts found. - )} - {names.map(name => ( - - ( + toggleWorkout(value, name)} - /> - toggleWorkout(!workouts.includes(name), name)}> + value={workouts.includes(name)} + onPress={() => toggleWorkout(!workouts.includes(name), name)}> {name} - - - ))} + + )) + )} {names.length === 0 ? (