fix(frontend): Typeringsproblemen opgelost.
This commit is contained in:
parent
4d98be78c1
commit
ed8b5c919d
9 changed files with 30 additions and 22 deletions
|
@ -1,9 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import ThemeCard from "@/components/ThemeCard.vue";
|
||||
import { ref, watchEffect, computed } from "vue";
|
||||
import {ref, watchEffect, computed, type Ref} from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { AGE_TO_THEMES, THEMESITEMS } from "@/utils/constants.ts";
|
||||
import { useThemeQuery } from "@/queries/themes.ts";
|
||||
import type {Theme} from "@/data-objects/theme.ts";
|
||||
|
||||
const props = defineProps({
|
||||
selectedTheme: { type: String, required: true },
|
||||
|
@ -15,11 +16,11 @@
|
|||
|
||||
const { data: allThemes, isLoading, error } = useThemeQuery(language);
|
||||
|
||||
const allCards = ref([]);
|
||||
const cards = ref([]);
|
||||
const allCards: Ref<Theme[]> = ref([]);
|
||||
const cards: Ref<Theme[]> = ref([]);
|
||||
|
||||
watchEffect(() => {
|
||||
const themes = allThemes.value ?? [];
|
||||
const themes: Theme[] = allThemes.value ?? [];
|
||||
allCards.value = themes;
|
||||
|
||||
if (props.selectedTheme) {
|
||||
|
|
|
@ -15,7 +15,7 @@ const props = defineProps<{learningPaths: LearningPath[]}>();
|
|||
class="learning-path-card"
|
||||
link
|
||||
:to="`/learningPath/${learningPath.hruid}/${learningPath.language}/${learningPath.startNode.learningobjectHruid}`"
|
||||
:key="[learningPath.hruid, learningPath.language]"
|
||||
:key="`${learningPath.hruid}/${learningPath.language}`"
|
||||
v-for="learningPath in props.learningPaths"
|
||||
>
|
||||
<v-img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue