Skip to content

Commit 82fea49

Browse files
committed
Remove chaptersWithQuiz from QuizState
1 parent e68cd7c commit 82fea49

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

context/QuizContextProvider.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ type Questions = {[questionID: string]: QuestionI};
4848

4949
export interface QuizStateI {
5050
questions: Questions;
51-
chaptersWithQuiz: number[];
5251
quizThreshold: number;
5352
}
5453

@@ -81,9 +80,6 @@ const getQuizState = ({
8180
}) => {
8281
const state: QuizStateI = {
8382
questions: getQuestionsFromChapters(chapters),
84-
chaptersWithQuiz: chapters
85-
.map((chapter, index) => (chapter.questions?.length ? index : -1))
86-
.filter((index) => index !== -1),
8783
quizThreshold,
8884
};
8985
(answers || []).forEach((answer) => {

0 commit comments

Comments
 (0)