Closed Seerden closed 2 years ago
Functionality not done yet. Have some new to-dos for the styling though:
Also implementing server-side functionality in this PR:
/exercise
routernewWorkout
validation and feedback messagesmutate({onSuccess: ...})
overwrite the useMutation(..., {onSuccess})
? Ideally we'd want a built-in onSuccess that updated the workout's value in queryCache, and an additional onSuccess at the call-site that handles the navigate()
call.
A: does not overwrite. Both onSuccess callbacks get called. The one from mutate()
gets called last.Merging this for now because the happy path is functional. Keeping the related issue open since there's still work to be done here.
See #4
Changes:
/workout/new
that builds a new workout with exercisesPOST /exercise/workout
that handles insertion of the newWorkout object passed from the client into the database as a combination ofworkout
andexercise
rowsMiscallaneous