feat: Only mark a level as done when the review is completed

This commit is contained in:
Alexander Polynomdivision
2018-10-03 14:19:23 +02:00
parent b32603f213
commit 5b399bf0d2
3 changed files with 12 additions and 3 deletions

View File

@@ -346,7 +346,6 @@ export default class Application extends React.Component<IProps> {
return <LevelPage
id={match.params.id}
levelVocab={this.getLevelVocab}
updateDoneLevels={this.updateDoneLevels}
setLastReview={this.setLastReview} />;
} else {
return <Redirect to="/login" />;
@@ -358,6 +357,7 @@ export default class Application extends React.Component<IProps> {
if (this.isAuthenticated()) {
return <ReviewPage
reviewType={ReviewType.LEVEL}
updateDoneLevels={this.updateDoneLevels}
levelId={match.params.id}
vocabByLevel={this.getLevelVocab}
setLastReview={this.setLastReview} />;