feat(04-03-partial): ExercisePicker and WorkoutEditPage components - swap/add/remove exercises with sets/reps editing

This commit is contained in:
2026-03-01 15:36:47 +01:00
parent 4d60a269ff
commit 843771e935
7 changed files with 446 additions and 5 deletions
+30
View File
@@ -0,0 +1,30 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
import './styles/App.css'
import WorkoutPage from './pages/WorkoutPage'
const App = () => {
// Minimal placeholder data to mount the page standalone
const day = {
name: 'Push A',
day_number: 1,
exercises: [
{ id: 1, name: 'Bench Press', muscle_group: 'Bröst', sets: 3, reps_min: 8, reps_max: 12 },
{ id: 2, name: 'Overhead Press', muscle_group: 'Axlar', sets: 3, reps_min: 8, reps_max: 12 }
]
}
const week = 1
const logs = {}
const onBack = () => { console.log('Back') }
const fetchProgression = async (id) => ({ suggestedWeight: 20 })
const onLogSet = () => {}
const onDeleteSet = () => {}
return (
<div className="app">
<WorkoutPage day={day} week={week} logs={logs} onBack={onBack} fetchProgression={fetchProgression} onLogSet={onLogSet} onDeleteSet={onDeleteSet} />
</div>
)
}
const root = createRoot(document.getElementById('root'))
root.render(<App />)