]> Untitled Git - lemmy-ui.git/commitdiff
Merge remote-tracking branch 'upstream/main' into main
authorIvo Barros <devL3v3L@gmail.com>
Thu, 22 Jun 2023 01:17:22 +0000 (02:17 +0100)
committerIvo Barros <devL3v3L@gmail.com>
Thu, 22 Jun 2023 01:17:22 +0000 (02:17 +0100)
1  2 
src/shared/components/common/sort-select.tsx
src/shared/utils/app/convert-comment-sort-type.ts

index 0000000000000000000000000000000000000000,3a89a23c774a7c4fd34d9f175cf93add02da45b9..665ab46269aa99451b2a0e823829f8106a206f25
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,25 +1,28 @@@
+ import { CommentSortType, SortType } from "lemmy-js-client";
+ export default function convertCommentSortType(
+   sort: SortType
+ ): CommentSortType {
+   switch (sort) {
+     case "TopAll":
++    case "TopHour":
++    case "TopSixHour":
++    case "TopTwelveHour":
+     case "TopDay":
+     case "TopWeek":
+     case "TopMonth":
+     case "TopYear": {
+       return "Top";
+     }
+     case "New": {
+       return "New";
+     }
+     case "Hot":
+     case "Active": {
+       return "Hot";
+     }
+     default: {
+       return "Hot";
+     }
+   }
+ }