Unregister event bus handler
This commit is contained in:
parent
1d77da83da
commit
bc16f6012b
|
|
@ -8,7 +8,7 @@ import LearningContentContainer from "@/pages/learningPath/learningContentPage/L
|
||||||
import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
|
import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
|
||||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import eventBus from "@/utils/eventBus";
|
import eventBus from "@/utils/eventBus";
|
||||||
import { computed, reactive } from "vue";
|
import { computed, onUnmounted, reactive } from "vue";
|
||||||
|
|
||||||
log.debug("LearningContent.vue setup");
|
log.debug("LearningContent.vue setup");
|
||||||
|
|
||||||
|
|
@ -52,8 +52,14 @@ function handleBack() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventBus.on("finishedLearningContent", () => {
|
function handleFinishedLearningContent() {
|
||||||
circleStore.closeSelfEvaluation(props.learningUnit);
|
circleStore.closeSelfEvaluation(props.learningUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
eventBus.on("finishedLearningContent", handleFinishedLearningContent);
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
eventBus.off("finishedLearningContent", handleFinishedLearningContent);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue