fix: Was ist Prozentrechnung?
This commit is contained in:
parent
1a07fd2ddb
commit
d08e591e27
@ -252,11 +252,19 @@ const ReviewPageWithRouter = withRouter(
|
|||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { question, qtype } = this.props.current;
|
const { question, qtype } = this.props.current;
|
||||||
const questionTitle = `${question} (${reviewQTypeToStr(qtype)})`;
|
const questionTitle = `${question} (${reviewQTypeToStr(qtype)})`;
|
||||||
// TODO:
|
// TODO/NOTE: This assumes that each vocabulary item gets mapped to
|
||||||
const progress = 50;
|
// exactly 3 review cards
|
||||||
|
// NOTE: The 'numCards === 0 ?' is neccessary as (for some reasdn) numCards
|
||||||
|
// starts of by being 0, which results in progress === -Inifinity.
|
||||||
|
// That looks weird as the user sees the progressbar jump.
|
||||||
|
const numCards = this.vocab.length * 3;
|
||||||
|
const progress = numCards === 0 ? (
|
||||||
|
0
|
||||||
|
) : (
|
||||||
|
100 * (numCards - (this.reviewQueue.size() + 1)) / numCards
|
||||||
|
);
|
||||||
|
|
||||||
return <div>
|
return <div>
|
||||||
<Grid container justify="center">
|
<Grid container justify="center">
|
||||||
|
Reference in New Issue
Block a user