Merged in fix/learning-path (pull request #329)

Show loading spinner
This commit is contained in:
Christian Cueni 2024-05-14 10:49:01 +00:00
commit 93a5cba262
1 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import LearningPathScrollButton from "@/pages/learningPath/learningPathPage/Lear
import { useScroll } from "@vueuse/core";
import { ref } from "vue";
import type { LearningContentWithCompletion, LearningPathType } from "@/types";
import LoadingSpinner from "@/components/ui/LoadingSpinner.vue";
const props = defineProps<{
learningPath: LearningPathType | undefined;
@ -35,7 +36,10 @@ const scrollLearnPathDiagram = (offset: number) => {
</script>
<template>
<div class="relative flex flex-row items-center">
<div v-if="!props.learningPath" class="m-8 flex justify-center">
<LoadingSpinner />
</div>
<div v-else class="relative flex flex-row items-center">
<LearningPathScrollButton
v-show="!arrivedState.left"
direction="left"