Streamlined stores
This commit is contained in:
@@ -2,24 +2,21 @@
|
||||
import { getAllExerciseGroups } from '@/data/api/exerciseApi';
|
||||
import scoreCard from './scoreCard.vue';
|
||||
import { ref } from 'vue';
|
||||
import { useFeedbackStore } from '@/stores/feedbackStore';
|
||||
import { ExerciseGroupApiModel } from '@/data/models/exercises/exerciseGroupApiModel';
|
||||
import { usePreferencesStore } from '@/stores/preferences.store';
|
||||
|
||||
const exerciseGroups = ref<Array<ExerciseGroupApiModel>>([])
|
||||
const feedbackStore = useFeedbackStore()
|
||||
|
||||
feedbackStore.fetchDataFromServerInProgress = true
|
||||
const preferencesStore = usePreferencesStore()
|
||||
|
||||
getAllExerciseGroups()
|
||||
.then(result => {
|
||||
exerciseGroups.value = result.data
|
||||
feedbackStore.fetchDataFromServerInProgress = false
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-container max-width="1000">
|
||||
<v-row v-if="feedbackStore.fetchDataFromServerInProgress" v-for="i in 3">
|
||||
<v-row v-if="preferencesStore.fetchInProgress" v-for="i in 3">
|
||||
<v-col>
|
||||
<score-card :loading="true"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user