Skip to content

Commit

Permalink
updated types
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyAsh5114 committed Jul 3, 2024
1 parent 6eba61b commit a00242c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/mesoToWorkouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type WorkoutExerciseInProgress = Omit<
> &
SetInProgress & {
miniSets: (Omit<
Prisma.WorkoutExerciseMiniSetsCreateWithoutParentSetInput,
Prisma.WorkoutExerciseMiniSetCreateWithoutParentSetInput,
'reps' | 'load' | 'RIR'
> &
SetInProgress)[];
Expand Down Expand Up @@ -49,12 +49,13 @@ export function createWorkoutExerciseInProgressFromMesocycleExerciseTemplate(
const { id, mesocycleExerciseSplitDayId, sets, ...exercise } = exerciseTemplate;
return {
...exercise,
sets: Array.from({ length: sets }).map(() => ({
sets: Array.from({ length: sets }).map((_, idx) => ({
reps: undefined,
load: undefined,
RIR: undefined,
completed: false,
miniSets: []
miniSets: [],
setIndex: idx
}))
};
}

0 comments on commit a00242c

Please sign in to comment.