diff --git a/vds-app/App/screens/QuizIndex.js b/vds-app/App/screens/QuizIndex.js index 5381b4e..ac00a15 100644 --- a/vds-app/App/screens/QuizIndex.js +++ b/vds-app/App/screens/QuizIndex.js @@ -84,7 +84,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.aerodynamics, - questions: aerodynamicsQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? aerodynamicsQuestions.filter(item => !item.delta) : aerodynamicsQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -94,7 +94,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.first_aid, - questions: firstAidQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? firstAidQuestions.filter(item => !item.delta) : firstAidQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -104,7 +104,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.flight_safety, - questions: flightSafetyQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? flightSafetyQuestions.filter(item => !item.delta) : flightSafetyQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -114,7 +114,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.instruments, - questions: instrumentsQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? instrumentsQuestions.filter(item => !item.delta) : instrumentsQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -124,7 +124,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.legislation, - questions: legislationQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? legislationQuestions.filter(item => !item.delta) : legislationQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -134,7 +134,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.materials, - questions: materialsQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? materialsQuestions.filter(item => !item.delta) : materialsQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -144,7 +144,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.meteorology, - questions: meteorologyQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? meteorologyQuestions.filter(item => !item.delta) : meteorologyQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -154,7 +154,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.physiopathology, - questions: physiopathologyQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? physiopathologyQuestions.filter(item => !item.delta) : physiopathologyQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue }) @@ -164,7 +164,7 @@ class QuizIndex extends React.Component { textColor={colors.white} onPress={()=> this.props.navigation.navigate("Quiz", { title: texts.piloting_techniques, - questions: pilotingTechniquesQuestions.filter(item => !item.delta), + questions: this.state.excludeDelta ? pilotingTechniquesQuestions.filter(item => !item.delta) : pilotingTechniquesQuestions, randomQuestions: this.state.randomQuestions, color: colors.blue })