From: c-andy-candies <74613851+c-andy-candies@users.noreply.github.com>
Date: Fri, 7 Jul 2023 17:37:50 +0000 (+0200)
Subject: Reopen PR 1420 Feature add three six and nine months options frontend (#1689)
X-Git-Url: http://these/git/%7B%24%7B%60data:application/static/%24%7Bsrc%7D?a=commitdiff_plain;h=214eae5be57f87afe1905c7fc97a7d03df8dfd5b;p=lemmy-ui.git

Reopen PR 1420 Feature add three six and nine months options frontend (#1689)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
---

diff --git a/src/shared/components/common/sort-select.tsx b/src/shared/components/common/sort-select.tsx
index 4d03ab5..088f45e 100644
--- a/src/shared/components/common/sort-select.tsx
+++ b/src/shared/components/common/sort-select.tsx
@@ -79,6 +79,15 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> {
           <option value={"TopMonth"}>
             {I18NextService.i18n.t("top_month")}
           </option>
+          <option value={"TopThreeMonths"}>
+            {I18NextService.i18n.t("top_three_months")}
+          </option>
+          <option value={"TopSixMonths"}>
+            {I18NextService.i18n.t("top_six_months")}
+          </option>
+          <option value={"TopNineMonths"}>
+            {I18NextService.i18n.t("top_nine_months")}
+          </option>
           <option value={"TopYear"}>{I18NextService.i18n.t("top_year")}</option>
           <option value={"TopAll"}>{I18NextService.i18n.t("top_all")}</option>
         </select>
diff --git a/src/shared/utils/app/convert-comment-sort-type.ts b/src/shared/utils/app/convert-comment-sort-type.ts
index 665ab46..2f920d4 100644
--- a/src/shared/utils/app/convert-comment-sort-type.ts
+++ b/src/shared/utils/app/convert-comment-sort-type.ts
@@ -11,6 +11,9 @@ export default function convertCommentSortType(
     case "TopDay":
     case "TopWeek":
     case "TopMonth":
+    case "TopThreeMonths":
+    case "TopSixMonths":
+    case "TopNineMonths":
     case "TopYear": {
       return "Top";
     }