Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scffs committed Sep 12, 2023
1 parent 4123191 commit 002f4f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions frontend/src/components/UI/MarksByDay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,21 @@ const MarksByDay: FC<IPerformanceCurrent> = ({ performanceData }) => {
marksByDay[day] = { grades: [], lessonName: '' };
}

// @ts-ignore
marksByDay[day].grades = [...marksByDay[day].grades, ...grades];
marksByDay[day].lessonName = lessonName;
}
});
});

const sort_by_day = (marksByDay: IMarksByDay): IMarksByDay => {
var mass = Object.keys(marksByDay).sort((b, a) => new Date(a).getTime() - new Date(b).getTime());
var marksByDaySort: IMarksByDay = {};
const mass = Object.keys(marksByDay).sort((b, a) => new Date(a).getTime() - new Date(b).getTime());
const marksByDaySort: IMarksByDay = {};

mass.forEach((day) => {
if (!marksByDaySort[day]) {
marksByDaySort[day] = { grades: [], lessonName: '' };
}

// @ts-ignore
marksByDaySort[day].grades = [...marksByDay[day].grades];
marksByDaySort[day].lessonName = marksByDay[day].lessonName;
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/vk-hosting-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"static_path": "dist",
"app_id": 51743817,
"app_id": 51740302,
"endpoints": {
"mobile": "index-b4.html",
"mvk": "index-b4.html",
Expand Down

0 comments on commit 002f4f8

Please sign in to comment.