From 8b8985309622a03c0e311d663d011854e5334e44 Mon Sep 17 00:00:00 2001 From: Andrey Mikhadyuk Date: Tue, 17 Oct 2023 17:59:42 +0300 Subject: [PATCH] revert "add projects sorting in the sidenav" This reverts commit 2a488912 --- src/store/states/commonLayout/saga/getProjects.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/store/states/commonLayout/saga/getProjects.ts b/src/store/states/commonLayout/saga/getProjects.ts index 1ea036ff11..978dfe64bb 100644 --- a/src/store/states/commonLayout/saga/getProjects.ts +++ b/src/store/states/commonLayout/saga/getProjects.ts @@ -3,7 +3,7 @@ import { selectUser } from "@/pages/Auth/store/selectors"; import { CommonService, GovernanceService, ProjectService } from "@/services"; import { Awaited } from "@/shared/interfaces"; import { User } from "@/shared/models"; -import { compareCommonsByLastActivity, isError } from "@/shared/utils"; +import { isError } from "@/shared/utils"; import { ProjectsStateItem } from "../../projects"; import * as actions from "../actions"; import { getPermissionsDataByAllUserCommonMemberInfo } from "./utils"; @@ -48,11 +48,8 @@ export function* getProjects( userCommonIds, permissionsData, ); - const projectsData: ProjectsStateItem[] = data - .sort((prevItem, nextItem) => - compareCommonsByLastActivity(prevItem.common, nextItem.common), - ) - .map(({ common, hasMembership, hasPermissionToAddProject }) => ({ + const projectsData: ProjectsStateItem[] = data.map( + ({ common, hasMembership, hasPermissionToAddProject }) => ({ commonId: common.id, image: common.image, name: common.name, @@ -60,7 +57,8 @@ export function* getProjects( hasMembership, hasPermissionToAddProject, notificationsAmount: 0, - })); + }), + ); yield put(actions.getProjects.success(projectsData)); } catch (error) {