From: Ivo Barros Date: Thu, 22 Jun 2023 01:17:22 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/main' into main X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%7B?a=commitdiff_plain;h=0beb2a434195f2d6f20bb7521aa973f3a63ed8d3;p=lemmy-ui.git Merge remote-tracking branch 'upstream/main' into main --- 0beb2a434195f2d6f20bb7521aa973f3a63ed8d3 diff --cc src/shared/utils/app/convert-comment-sort-type.ts index 0000000,3a89a23..665ab46 mode 000000,100644..100644 --- a/src/shared/utils/app/convert-comment-sort-type.ts +++ b/src/shared/utils/app/convert-comment-sort-type.ts @@@ -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"; + } + } + }