Added more control over the stats appearing in the stats page
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {Module} from "@/interfaces";
|
||||
import {Exercise} from "@/interfaces/exam";
|
||||
|
||||
export const MODULE_ARRAY: Module[] = ["reading", "listening", "writing", "speaking"];
|
||||
export const MODULE_ARRAY: Module[] = ["reading", "listening", "writing", "speaking", "level"];
|
||||
|
||||
export const moduleLabels: {[key in Module]: string} = {
|
||||
listening: "Listening",
|
||||
@@ -11,7 +11,7 @@ export const moduleLabels: {[key in Module]: string} = {
|
||||
level: "Level",
|
||||
};
|
||||
|
||||
export const sortByModule = (a: {module: Module}, b: {module: Module}) => {
|
||||
export const sortByModule = (a: {module: Module; [key: string]: any}, b: {module: Module; [key: string]: any}) => {
|
||||
return MODULE_ARRAY.findIndex((x) => a.module === x) - MODULE_ARRAY.findIndex((x) => b.module === x);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user