fix: Done levels were not marked as such
This commit is contained in:
parent
5361d1bab5
commit
32fadc19e5
@ -74,10 +74,11 @@ const LevelListWithRouter = withRouter(
|
||||
|
||||
const small = window.matchMedia("(max-width: 700px)").matches;
|
||||
const cName = small ? "lesson-card-xs" : "lesson-card-lg";
|
||||
const { levels } = this.props.user;
|
||||
|
||||
let key = 0;
|
||||
const levelToCard = (level: ILevel) => {
|
||||
const suffix = level.level in this.props.user.levels ? " ✔" : "";
|
||||
const suffix = levels.indexOf(level.level) !== -1 ? " ✔" : "";
|
||||
return <Grid item key={key++}>
|
||||
<Card style={{
|
||||
width: small ? window.width - 32 : "300px"
|
||||
|
Reference in New Issue
Block a user