fix(demo): превью вызывает loadState — без него состояние оставалось пустым

This commit is contained in:
Иван Овчинников
2026-11-20 07:40:49 +03:00
parent e77aa6df17
commit 97176ed90e
+2
View File
@@ -39,9 +39,11 @@ localStorage.removeItem('gym_auth_user');
localStorage.setItem('gym_tracker_v7_guest', JSON.stringify(window.GYM_DEMO_SEED));
</script>
<script type="module">
import { loadState } from './js/state.js';
import { drawExerciseProgress } from './js/render/dashboard.js';
import './js/modals/chart-modal.js';
loadState(); // state наполняется из localStorage только этим вызовом (как в app.js)
drawExerciseProgress(document.getElementById('chart-barbell'), 'Жим штанги лёжа');
drawExerciseProgress(document.getElementById('chart-dumbbell'), 'Жим гантелей на лавке 30');
</script>