/* @component-map * App — Main container, handles phase switching and layout * Header — Top header with title and pills * PhasePanel — Displays a single phase's content (day grid, workout box, principles) * WorkoutBox — Shows selected day's workout with exercise rows * ExerciseGuide — Expandable form guide with cues, mistakes, video tabs * ProgressTracker — 60-day dot grid and stats * @end-component-map */ import { useCollection } from '@deplixo/sdk'; import { Header } from './components/Header.jsx'; import { PhasePanel } from './components/PhasePanel.jsx'; import { useState } from 'react'; import { ProgressTracker } from './components/ProgressTracker.jsx'; function App() { const [activePhase, setActivePhase] = useState(1); const { items: progressItems, add, remove, loading } = useCollection('progress', { personal: true }); const doneMap = {}; progressItems.forEach(item => { doneMap[item.value.day] = item.id; }); const toggleDay = async (day) => { if (doneMap[day]) { await remove(doneMap[day]); } else { await add({ day }); } }; const doneCount = progressItems.length; return (
How to use: Click a phase tab then a day to load the workout. Click any exercise or the Form button to expand the guide — then hit Video to watch it embedded right here.
Select Phase
{[1, 2, 3].map(p => ( ))}
{[1, 2, 3].map(p => ( ))}
); } ReactDOM.createRoot(document.getElementById("root")).render();