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:
+18
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user