do not sort files/hunks on the frontend

This commit is contained in:
Nikita Galaiko 2023-07-11 09:08:56 +02:00
parent 2c0f563bb2
commit 4ed39d7d9b

View File

@ -77,13 +77,5 @@ export async function fetchFromTarget(params: { projectId: string }) {
function sortBranches(branches: Branch[]): Branch[] {
branches.sort((a, b) => a.order - b.order);
branches.forEach((branch) => {
const files = branch.files;
files.sort((a, b) => b.modifiedAt.getTime() - a.modifiedAt.getTime());
files.forEach((file) => {
const hunks = file.hunks;
hunks.sort((a, b) => b.modifiedAt.getTime() - a.modifiedAt.getTime());
});
});
return branches;
}