From 3e436179fec5bf6124533b7399f5599e642ef8d4 Mon Sep 17 00:00:00 2001 From: Kunal Vishwakarma <116634168+kunalv17@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:54:22 +0530 Subject: [PATCH] chore: added default state for issues (#840) --- apps/app/components/issues/select/state.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/app/components/issues/select/state.tsx b/apps/app/components/issues/select/state.tsx index eeb08bfa3..f1fd1d22b 100644 --- a/apps/app/components/issues/select/state.tsx +++ b/apps/app/components/issues/select/state.tsx @@ -48,6 +48,7 @@ export const IssueStateSelect: React.FC = ({ setIsOpen, value, onChange, })); const selectedOption = states?.find((s) => s.id === value); + const currentDefaultState = states.find((s) => s.default); return ( = ({ setIsOpen, value, onChange,
{selectedOption ? ( getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color) + ) : currentDefaultState ? ( + getStateGroupIcon(currentDefaultState.group, "16", "16", currentDefaultState.color) ) : ( )} - - {selectedOption?.name ?? "State"} + {selectedOption?.name ? selectedOption.name : currentDefaultState?.name ?? "State"}
} footerOption={