fix(frontend): Typeringsproblemen opgelost.

This commit is contained in:
Gerald Schmittinger 2025-04-01 16:34:30 +02:00
parent 4d98be78c1
commit ed8b5c919d
9 changed files with 30 additions and 22 deletions

View file

@ -39,13 +39,13 @@ export function useLearningObjectHTMLQuery(
}
export function useLearningObjectListForPathQuery(
learningPath: MaybeRefOrGetter<LearningPath>
): UseQueryReturnType<LearningObject, Error> {
learningPath: MaybeRefOrGetter<LearningPath | undefined>
): UseQueryReturnType<LearningObject[], Error> {
return useQuery({
queryKey: [LEARNING_OBJECT_KEY, "onPath", learningPath],
queryFn: async () => {
const learningObjects = [];
for (const node of toValue(learningPath).nodesAsList) {
const learningObjects: Promise<LearningObject>[] = [];
for (const node of toValue(learningPath)!.nodesAsList) {
learningObjects.push(
learningObjectController.getMetadata(node.learningobjectHruid, node.language, node.version)
);