Skip to content

Commit

Permalink
Just use setWorkoutPart from props
Browse files Browse the repository at this point in the history
  • Loading branch information
morteako committed Oct 17, 2024
1 parent 950bab9 commit ebd049c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions apps/frontend/src/components/WorkoutMenu/WorkoutIntervalInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,23 @@ interface Data {
interface UpdateTimeSeconds {
type: 'UPDATE_TIME_SECONDS';
value: string;
setWorkoutPart: (workoutPart: WorkoutPart) => void;
}
interface UpdateTimeMinutes {
type: 'UPDATE_TIME_MINUTES';
value: string;
setWorkoutPart: (workoutPart: WorkoutPart) => void;
}
interface UpdateTime {
type: 'UPDATE_TIME';
setWorkoutPart: (workoutPart: WorkoutPart) => void;
}
interface UpdatePowerWatt {
type: 'UPDATE_POWER_WATT';
value: string;
ftp: number;
setWorkoutPart: (workoutPart: WorkoutPart) => void;
}
interface UpdatePowerPercent {
type: 'UPDATE_POWER_PERCENT';
value: string;
ftp: number;
setWorkoutPart: (workoutPart: WorkoutPart) => void;
}

interface FtpUpdated {
Expand Down Expand Up @@ -217,13 +212,11 @@ export const WorkoutIntervalInput = ({
dispatchDataUpdate({
type: 'UPDATE_TIME_MINUTES',
value: e.target.value,
setWorkoutPart,
})
}
onBlur={() =>
dispatchDataUpdate({
type: 'UPDATE_TIME',
setWorkoutPart,
})
}
/>
Expand All @@ -240,13 +233,11 @@ export const WorkoutIntervalInput = ({
dispatchDataUpdate({
type: 'UPDATE_TIME_SECONDS',
value: e.target.value,
setWorkoutPart,
});
}}
onBlur={() =>
dispatchDataUpdate({
type: 'UPDATE_TIME',
setWorkoutPart,
})
}
/>
Expand All @@ -269,7 +260,6 @@ export const WorkoutIntervalInput = ({
type: 'UPDATE_POWER_WATT',
value: e.target.value,
ftp,
setWorkoutPart,
});
}}
/>
Expand All @@ -287,7 +277,6 @@ export const WorkoutIntervalInput = ({
type: 'UPDATE_POWER_PERCENT',
value: e.target.value,
ftp,
setWorkoutPart,
});
}}
/>
Expand Down

0 comments on commit ebd049c

Please sign in to comment.