From 23e62c83ebd443af8d632751d8877eb02c3b0773 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:22:31 +0530 Subject: [PATCH] refactor: switched priority null -> 'none' (#2166) --- web/components/issues/form.tsx | 2 +- web/components/issues/select/priority.tsx | 2 +- web/components/web-view/select-priority.tsx | 2 +- web/constants/project.ts | 2 +- web/types/issues.d.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/components/issues/form.tsx b/web/components/issues/form.tsx index 0bca224df..177155f10 100644 --- a/web/components/issues/form.tsx +++ b/web/components/issues/form.tsx @@ -52,7 +52,7 @@ const defaultValues: Partial = { estimate_point: null, state: "", parent: null, - priority: null, + priority: "none", assignees: [], assignees_list: [], labels: [], diff --git a/web/components/issues/select/priority.tsx b/web/components/issues/select/priority.tsx index 6a2a07cbd..8624f8cf8 100644 --- a/web/components/issues/select/priority.tsx +++ b/web/components/issues/select/priority.tsx @@ -40,7 +40,7 @@ export const IssuePrioritySelect: React.FC = ({ value, onChange }) => ( - {priority ?? "None"} + {priority} diff --git a/web/components/web-view/select-priority.tsx b/web/components/web-view/select-priority.tsx index ce7eef343..8267f22c4 100644 --- a/web/components/web-view/select-priority.tsx +++ b/web/components/web-view/select-priority.tsx @@ -39,7 +39,7 @@ export const PrioritySelect: React.FC = (props) => { ({ - label: priority ? capitalizeFirstLetter(priority) : "None", + label: capitalizeFirstLetter(priority), value: priority, checked: priority === value, onClick: () => { diff --git a/web/constants/project.ts b/web/constants/project.ts index 1a366ead6..b8e3be9d6 100644 --- a/web/constants/project.ts +++ b/web/constants/project.ts @@ -21,7 +21,7 @@ export const GROUP_CHOICES = { cancelled: "Cancelled", }; -export const PRIORITIES: TIssuePriorities[] = ["urgent", "high", "medium", "low", null]; +export const PRIORITIES: TIssuePriorities[] = ["urgent", "high", "medium", "low", "none"]; export const MONTHS = [ "January", diff --git a/web/types/issues.d.ts b/web/types/issues.d.ts index b21f5e521..138e73d98 100644 --- a/web/types/issues.d.ts +++ b/web/types/issues.d.ts @@ -248,4 +248,4 @@ export interface IIssueViewProps { properties: Properties; } -export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | null; +export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | "none";