From 844573d1ffa612062d6d66547c55373ac0efa73b Mon Sep 17 00:00:00 2001 From: Marius Kaczmarek Date: Thu, 16 Nov 2023 15:42:10 +0100 Subject: [PATCH] fixed unclickable BottomTooltip --- .../Core/Presentation/Babylon/Door/DoorPresenter.ts | 5 +++++ .../LearningSpaceDisplay/BottomTooltip/BottomTooltip.tsx | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Components/Core/Presentation/Babylon/Door/DoorPresenter.ts b/src/Components/Core/Presentation/Babylon/Door/DoorPresenter.ts index b43af8055..09acc0c05 100644 --- a/src/Components/Core/Presentation/Babylon/Door/DoorPresenter.ts +++ b/src/Components/Core/Presentation/Babylon/Door/DoorPresenter.ts @@ -8,6 +8,8 @@ import PRESENTATION_TYPES from "~DependencyInjection/Presentation/PRESENTATION_T import IExitModalPresenter from "~ReactComponents/LearningSpaceDisplay/ExitModal/IExitModalPresenter"; import { LearningElementTypes } from "src/Components/Core/Domain/Types/LearningElementTypes"; import bind from "bind-decorator"; +import IGetLearningSpacePrecursorAndSuccessorUseCase from "../../../Application/UseCases/GetLearningSpacePrecursorAndSuccessor/IGetLearningSpacePrecursorAndSuccessorUseCase"; +import USECASE_TYPES from "~DependencyInjection/UseCases/USECASE_TYPES"; export default class DoorPresenter implements IDoorPresenter { private bottomTooltipPresenter: IBottomTooltipPresenter; @@ -58,6 +60,9 @@ export default class DoorPresenter implements IDoorPresenter { @bind private openExitModal(): void { + CoreDIContainer.get( + USECASE_TYPES.IGetLearningSpacePrecursorAndSuccessorUseCase + ).execute(); this.exitModalPresenter.open(this.viewModel.isExit); } } diff --git a/src/Components/Core/Presentation/React/LearningSpaceDisplay/BottomTooltip/BottomTooltip.tsx b/src/Components/Core/Presentation/React/LearningSpaceDisplay/BottomTooltip/BottomTooltip.tsx index bb0aee727..60b24f8dc 100644 --- a/src/Components/Core/Presentation/React/LearningSpaceDisplay/BottomTooltip/BottomTooltip.tsx +++ b/src/Components/Core/Presentation/React/LearningSpaceDisplay/BottomTooltip/BottomTooltip.tsx @@ -31,14 +31,12 @@ export default function BottomTooltip({
{ - console.log("click"); // TODO: remove log when click works - viewModel.onClickCallback.Value(); - }} + className="cursor-pointer" + onClick={viewModel.onClickCallback.Value} >
{type !== LearningElementTypes.notAnElement &&