From 7f1def2041a3bb3cf6992811318019eeab1433f8 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:01:57 +0530 Subject: [PATCH] fix: priority none filter (#1407) --- apps/app/components/core/filters-list.tsx | 2 +- apps/app/components/inbox/filters-dropdown.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/app/components/core/filters-list.tsx b/apps/app/components/core/filters-list.tsx index 70f980aae..e080c8e9a 100644 --- a/apps/app/components/core/filters-list.tsx +++ b/apps/app/components/core/filters-list.tsx @@ -135,7 +135,7 @@ export const FilterList: React.FC = ({ filters, setFilters }) => { }`} > {getPriorityIcon(priority)} - {priority ? priority : "None"} + {priority === "null" ? "None" : priority} diff --git a/apps/app/components/inbox/filters-dropdown.tsx b/apps/app/components/inbox/filters-dropdown.tsx index 1b6af608c..c12fcb8d2 100644 --- a/apps/app/components/inbox/filters-dropdown.tsx +++ b/apps/app/components/inbox/filters-dropdown.tsx @@ -39,7 +39,7 @@ export const FiltersDropdown: React.FC = () => { value: PRIORITIES, children: [ ...PRIORITIES.map((priority) => ({ - id: priority ?? "none", + id: priority === null ? "null" : priority, label: (
{getPriorityIcon(priority)} {priority ?? "None"} @@ -47,9 +47,9 @@ export const FiltersDropdown: React.FC = () => { ), value: { key: "priority", - value: priority, + value: priority === null ? "null" : priority, }, - selected: filters?.priority?.includes(priority ?? "none"), + selected: filters?.priority?.includes(priority === null ? "null" : priority), })), ], },