Skip to content

Commit

Permalink
fixed linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mountler committed Oct 30, 2023
1 parent 3eef65f commit c5d263c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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 c5d263c

Please sign in to comment.