ianedwards 2 лет назад
Родитель
Сommit
1c803713cd
1 измененных файлов с 12 добавлено и 2 удалено
  1. 12 2
      dashboard/src/main/home/app-dashboard/apps/AppGrid.tsx

+ 12 - 2
dashboard/src/main/home/app-dashboard/apps/AppGrid.tsx

@@ -64,9 +64,19 @@ const AppGrid: React.FC<AppGridProps> = ({ apps, searchValue, view, sort }) => {
 
     return match(sort)
       .with("calendar", () =>
-        _.sortBy(filteredBySearch, ["last_deployed"]).reverse()
+        _.sortBy(filteredBySearch, [
+          (a) => {
+            return a.app_revision.updated_at;
+          },
+        ]).reverse()
+      )
+      .with("letter", () =>
+        _.sortBy(filteredBySearch, [
+          (a) => {
+            return a.source.name;
+          },
+        ])
       )
-      .with("letter", () => _.sortBy(filteredBySearch, ["name"]))
       .exhaustive();
   }, [appsWithProto, searchValue, sort]);