Started to update the exam to work with Zustand for the history review
This commit is contained in:
@@ -91,5 +91,10 @@ export const formatExerciseAverageScoreStats = (stats: Stat[]): {label: string;
|
||||
});
|
||||
};
|
||||
|
||||
export const getExamsBySession = (stats: Stat[], session: string) => {
|
||||
const grouped = groupBySession(stats);
|
||||
return grouped[session].map((exam) => exam.exam);
|
||||
};
|
||||
|
||||
export const groupBySession = (stats: Stat[]) => groupBy(stats, "session");
|
||||
export const groupByDate = (stats: Stat[]) => groupBy(stats, "date");
|
||||
|
||||
Reference in New Issue
Block a user