Add ProfilePage and ProgressPage

ProfilePage:
- View/edit user info (name, age, height, goal, level)
- Show current measurements (weight, body fat, waist, neck)
- Show strength records (bench/squat/deadlift 1RM)

ProgressPage:
- Tab navigation (weight, body fat, strength)
- SVG line charts for progress visualization
- Stats showing current, first, and change
- Trend indicators (up/down)

Dashboard:
- Navigation icons for profile (👤) and progress (📊)
- Connected navigation to App.jsx routing
This commit is contained in:
2026-02-01 11:50:52 +01:00
parent 968b719be7
commit add0b2a86b
5 changed files with 1024 additions and 4 deletions
+18 -1
View File
@@ -1,6 +1,8 @@
import { useState, useEffect } from 'react'
import { useAuth } from './context/AuthContext'
import Dashboard from './pages/Dashboard'
import ProfilePage from './pages/ProfilePage'
import ProgressPage from './pages/ProgressPage'
import './App.css'
const API_URL = '/api'
@@ -95,7 +97,22 @@ function App() {
// Dashboard view (default after login)
if (view === 'dashboard') {
return <Dashboard onStartWorkout={startWorkout} />
return (
<Dashboard
onStartWorkout={startWorkout}
onNavigate={setView}
/>
)
}
// Profile page
if (view === 'profile') {
return <ProfilePage onBack={() => setView('dashboard')} />
}
// Progress page
if (view === 'progress') {
return <ProgressPage onBack={() => setView('dashboard')} />
}
// Workout view