mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 22:07:10 +00:00
history sorting test
This commit is contained in:
@@ -42,7 +42,11 @@ const TaskSolution: React.FC<TaskSolutionProps> = ({
|
||||
enabled: !!(competitionId && task.id),
|
||||
});
|
||||
|
||||
const solutionHistory = solutionsQuery.data || [];
|
||||
const solutionHistory = [...(solutionsQuery.data || [])].sort((a, b) => {
|
||||
const dateA = new Date(a.timestamp);
|
||||
const dateB = new Date(b.timestamp);
|
||||
return dateA.getTime() - dateB.getTime();
|
||||
});
|
||||
|
||||
let lastSolutionPoints = 0;
|
||||
if (solutionHistory.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user