- Implemented an image attachment to the Writing exercise;

- Made it so the exams are now sorted when going through the history;
- Corrected some little mistakes;
This commit is contained in:
Tiago Ribeiro
2023-05-28 10:00:06 +01:00
parent 7f72349f76
commit 79a532b5ff
8 changed files with 31 additions and 8 deletions

View File

@@ -1,8 +1,14 @@
import {Module} from "@/interfaces";
const MODULE_ARRAY: Module[] = ["reading", "listening", "writing", "speaking"];
export const moduleLabels: {[key in Module]: string} = {
listening: "Listening",
reading: "Reading",
speaking: "Speaking",
writing: "Writing",
};
export const sortByModule = (a: {module: Module}, b: {module: Module}) => {
return MODULE_ARRAY.findIndex((x) => a.module === x) - MODULE_ARRAY.findIndex((x) => b.module === x);
};