fix(frontend): Typeringsproblemen opgelost.
This commit is contained in:
parent
4d98be78c1
commit
ed8b5c919d
9 changed files with 30 additions and 22 deletions
|
@ -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)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue