From ad8c3608f8135c6b816b74ded7187c1cc0da0295 Mon Sep 17 00:00:00 2001 From: davidpborromeo Date: Sat, 23 Jun 2018 23:38:07 +0900 Subject: [PATCH] #50 fix bug in score --- app/actions/helper.js | 2 +- app/screens/Study/score.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/actions/helper.js b/app/actions/helper.js index 262a0e9..06e7d25 100644 --- a/app/actions/helper.js +++ b/app/actions/helper.js @@ -22,7 +22,7 @@ export function countScore(studyRecord,quizItems = 0, byPoint = false) { if(quizItems && !byPoint){ countQuest = 100; } - else{ + else if(byPoint){ countQuest = quizItems * 2; } diff --git a/app/screens/Study/score.js b/app/screens/Study/score.js index 21350cd..d9e679b 100644 --- a/app/screens/Study/score.js +++ b/app/screens/Study/score.js @@ -303,7 +303,7 @@ const study = require('../../styles/study'); // and insert/links it into the props of our component. // This function makes Redux know that this component needs to be passed a piece of the state function mapStateToProps(state, props) { - + console.log(state.study); const score = Helper.countScore(state.study.studyRecord,state.study.quizSize); return {