fix(demo): превью вызывает loadState — без него состояние оставалось пустым
This commit is contained in:
@@ -39,9 +39,11 @@ localStorage.removeItem('gym_auth_user');
|
|||||||
localStorage.setItem('gym_tracker_v7_guest', JSON.stringify(window.GYM_DEMO_SEED));
|
localStorage.setItem('gym_tracker_v7_guest', JSON.stringify(window.GYM_DEMO_SEED));
|
||||||
</script>
|
</script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
|
import { loadState } from './js/state.js';
|
||||||
import { drawExerciseProgress } from './js/render/dashboard.js';
|
import { drawExerciseProgress } from './js/render/dashboard.js';
|
||||||
import './js/modals/chart-modal.js';
|
import './js/modals/chart-modal.js';
|
||||||
|
|
||||||
|
loadState(); // state наполняется из localStorage только этим вызовом (как в app.js)
|
||||||
drawExerciseProgress(document.getElementById('chart-barbell'), 'Жим штанги лёжа');
|
drawExerciseProgress(document.getElementById('chart-barbell'), 'Жим штанги лёжа');
|
||||||
drawExerciseProgress(document.getElementById('chart-dumbbell'), 'Жим гантелей на лавке 30');
|
drawExerciseProgress(document.getElementById('chart-dumbbell'), 'Жим гантелей на лавке 30');
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user