Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
splican committed Oct 30, 2023
2 parents a5c3cf1 + 79e0ed1 commit 5df625f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@ The AdLer Engine uses [Semantic Versioning](http://semver.org/).

### Added

-

### Changed

-

### Deprecated

-

### Removed

-

### Fixed

-

### Security

-

</details>

## Version 2.0.0-rc.1

### Added

- Adaptivity Element:

- specific icon for adaptivity element
Expand Down Expand Up @@ -51,8 +79,6 @@ The AdLer Engine uses [Semantic Versioning](http://semver.org/).

-

</details>

## Version 1.3.0 - 08.09.2023

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function AdaptivityElementAnswerSelection({

setAnswerColors(newColors);
},
[question.isMultipleChoice, question.questionAnswers]
[question]
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import tailwindMerge from "../../Utils/TailwindMerge";
import StyledButton from "~ReactComponents/ReactRelated/ReactBaseComponents/StyledButton";
import TextWithLineBreaks from "~ReactComponents/ReactRelated/ReactBaseComponents/TextWithLineBreaks";
import pauseIcon from "../../../../../Assets/icons/42-pause-icon/47-pause-icon-nobg.svg";
import { useEffect } from "react";
import { useEffect, useState } from "react";

export default function BreakTimeNotification({ className }: AdLerUIComponent) {
const [viewModel, controller] = useBuilder<
Expand All @@ -22,13 +22,12 @@ export default function BreakTimeNotification({ className }: AdLerUIComponent) {
const [showMinimizedModal] = useObservable(viewModel?.showMinimizedModal);
const [breakType] = useObservable(viewModel?.breakType);
useObservable(viewModel?.slideIndex);

let randomIndex = 0;
const [randomIndex, setRandomIndex] = useState<number>(0);

useEffect(() => {
randomIndex = Math.floor(Math.random());
setRandomIndex(Math.floor(Math.random()));
controller.setSliderIndex(1);
}, [viewModel?.showModal]);
}, [viewModel?.showModal, controller]);

if (!viewModel || !controller || !showModal || !breakType) return null;

Expand Down

0 comments on commit 5df625f

Please sign in to comment.