chore: fix analytics navigation buttons (#3494)
This commit is contained in:
parent
77040024d4
commit
880aff1b47
2 changed files with 1 additions and 12 deletions
|
|
@ -113,7 +113,7 @@ class LearningProgressIndicatorsState
|
|||
selected: widget.selected == c.indicator,
|
||||
onPressed: () {
|
||||
context.go(
|
||||
"/rooms/analytics?mode=${c.indicator.toShortString()}",
|
||||
"/rooms/analytics?mode=${c.string}",
|
||||
);
|
||||
},
|
||||
child: ProgressIndicatorBadge(
|
||||
|
|
|
|||
|
|
@ -22,17 +22,6 @@ enum ProgressIndicatorEnum {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String toShortString() {
|
||||
switch (this) {
|
||||
case ProgressIndicatorEnum.wordsUsed:
|
||||
return 'vocab';
|
||||
case ProgressIndicatorEnum.morphsUsed:
|
||||
return 'morphs';
|
||||
case ProgressIndicatorEnum.level:
|
||||
return 'level';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ProgressIndicatorsExtension on ProgressIndicatorEnum {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue