fix intervals not loading and other library issues
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
<aside class="filters-sidebar">
|
||||
<WorkoutFilters
|
||||
:filters="store.filters"
|
||||
:workout-types="store.workoutTypes"
|
||||
:workout-categories="store.workoutCategories"
|
||||
:difficulty-levels="store.difficultyLevels"
|
||||
@update:filters="handleFilterChange"
|
||||
/>
|
||||
</aside>
|
||||
@@ -139,7 +142,7 @@ const store = useWorkoutLibraryStore()
|
||||
const viewMode = ref('grid')
|
||||
|
||||
const totalPages = computed(() => {
|
||||
return Math.ceil(store.pagination.total / store.pagination.limit)
|
||||
return Math.ceil(store.pagination.total / store.pagination.pageSize)
|
||||
})
|
||||
|
||||
function handleFilterChange(filters) {
|
||||
@@ -165,6 +168,7 @@ async function toggleFavorite(workoutId) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
store.fetchTypes()
|
||||
store.fetchWorkouts()
|
||||
store.fetchFavorites()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user