π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-831] fix: sentry issue and code refactor (#4063)
Anmol Singh Bhatiaea728a385ff5
diff --git a/web/components/command-palette/command-palette.tsx b/web/components/command-palette/command-palette.tsxindex 8d162f6ab9..490d392e2c 100644--- a/web/components/command-palette/command-palette.tsx+++ b/web/components/command-palette/command-palette.tsx@@ -113,8 +113,6 @@ export const CommandPalette: FC = observer(() => {const canPerformWorkspaceCreateActions = useCallback((showToast: boolean = true) => {const isAllowed = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;- console.log("currentWorkspaceRole", currentWorkspaceRole);- console.log("isAllowed", isAllowed);if (!isAllowed && showToast)setToast({type: TOAST_TYPE.ERROR,diff --git a/web/components/cycles/modal.tsx b/web/components/cycles/modal.tsxindex 008cdcbdeb..6ed53eb326 100644--- a/web/components/cycles/modal.tsx+++ b/web/components/cycles/modal.tsx@@ -56,7 +56,7 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {setToast({type: TOAST_TYPE.ERROR,title: "Error!",- message: err.detail ?? "Error in creating cycle. Please try again.",+ message: err?.detail ?? "Error in creating cycle. Please try again.",});captureCycleEvent({eventName: CYCLE_CREATED,@@ -90,7 +90,7 @@ export const CycleCreateUpdateModal: React.FC<CycleModalProps> = (props) => {setToast({type: TOAST_TYPE.ERROR,title: "Error!",- message: err.detail ?? "Error in updating cycle. Please try again.",+ message: err?.detail ?? "Error in updating cycle. Please try again.",});});};diff --git a/web/components/issues/issue-layouts/calendar/base-calendar-root.tsx b/web/components/issues/issue-layouts/calendar/base-calendar-root.tsxindex 9e54d2cf76..d5b263776b 100644--- a/web/components/issues/issue-layouts/calendar/base-calendar-root.tsx+++ b/web/components/issues/issue-layouts/calendar/base-calendar-root.tsx@@ -73,7 +73,7 @@ export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {setToast({title: "Error",type: TOAST_TYPE.ERROR,- message: err.detail ?? "Failed to perform this action",+ message: err?.detail ?? "Failed to perform this action",});});}diff --git a/web/components/issues/issue-layouts/kanban/base-kanban-root.tsx b/web/components/issues/issue-layouts/kanban/base-kanban-root.tsxindex 21e47c1cd6..4104308531 100644--- a/web/components/issues/issue-layouts/kanban/base-kanban-root.tsx+++ b/web/components/issues/issue-layouts/kanban/base-kanban-root.tsx@@ -143,7 +143,7 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBassetToast({title: "Error",type: TOAST_TYPE.ERROR,- message: err.detail ?? "Failed to perform this action",+ message: err?.detail ?? "Failed to perform this action",});});}diff --git a/web/components/modules/modal.tsx b/web/components/modules/modal.tsxindex 7242073b1c..89ae7f3212 100644--- a/web/components/modules/modal.tsx+++ b/web/components/modules/modal.tsx@@ -68,7 +68,7 @@ export const CreateUpdateModuleModal: React.FC<Props> = observer((props) => {setToast({type: TOAST_TYPE.ERROR,title: "Error!",- message: err.detail ?? "Module could not be created. Please try again.",+ message: err?.detail ?? "Module could not be created. Please try again.",});captureModuleEvent({eventName: MODULE_CREATED,@@ -99,7 +99,7 @@ export const CreateUpdateModuleModal: React.FC<Props> = observer((props) => {setToast({type: TOAST_TYPE.ERROR,title: "Error!",- message: err.detail ?? "Module could not be updated. Please try again.",+ message: err?.detail ?? "Module could not be updated. Please try again.",});captureModuleEvent({eventName: MODULE_UPDATED,diff --git a/web/components/project/create-project-form.tsx b/web/components/project/create-project-form.tsxindex a9d76210d0..14d723e6d5 100644--- a/web/components/project/create-project-form.tsx+++ b/web/components/project/create-project-form.tsx@@ -209,8 +209,10 @@ export const CreateProjectForm: FC<Props> = observer((props) => {[val.type]: logoValue,});}}- defaultIconColor={value.in_use === "icon" ? value.icon?.color : undefined}- defaultOpen={value.in_use === "emoji" ? EmojiIconPickerTypes.EMOJI : EmojiIconPickerTypes.ICON}+ defaultIconColor={value.in_use && value.in_use === "icon" ? value.icon?.color : undefined}+ defaultOpen={+ value.in_use && value.in_use === "emoji" ? EmojiIconPickerTypes.EMOJI : EmojiIconPickerTypes.ICON+ }/>)}/>diff --git a/web/components/project/form.tsx b/web/components/project/form.tsxindex aaaaf03b3b..3e770a6185 100644--- a/web/components/project/form.tsx+++ b/web/components/project/form.tsx@@ -166,8 +166,10 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (props) => {[val.type]: logoValue,});}}- defaultIconColor={value.in_use === "icon" ? value.icon?.color : undefined}- defaultOpen={value.in_use === "emoji" ? EmojiIconPickerTypes.EMOJI : EmojiIconPickerTypes.ICON}+ defaultIconColor={value?.in_use && value.in_use === "icon" ? value?.icon?.color : undefined}+ defaultOpen={+ value.in_use && value.in_use === "emoji" ? EmojiIconPickerTypes.EMOJI : EmojiIconPickerTypes.ICON+ }disabled={!isAdmin}/>)}diff --git a/web/components/project/project-logo.tsx b/web/components/project/project-logo.tsxindex c06dc3061b..fc90fdba3d 100644--- a/web/components/project/project-logo.tsx+++ b/web/components/project/project-logo.tsx@@ -11,7 +11,7 @@ type Props = {export const ProjectLogo: React.FC<Props> = (props) => {const { className, logo } = props;- if (logo && logo.in_use === "icon" && logo.icon)+ if (logo?.in_use === "icon" && logo?.icon)return (<spanstyle={{@@ -23,12 +23,12 @@ export const ProjectLogo: React.FC<Props> = (props) => {</span>);- if (logo && logo.in_use === "emoji" && logo.emoji)+ if (logo?.in_use === "emoji" && logo?.emoji)return (<span className={cn("text-base", className)}>{logo.emoji.value?.split("-").map((emoji) => String.fromCodePoint(parseInt(emoji, 10)))}</span>);- return <span />;+ return <></>;};diff --git a/web/components/views/modal.tsx b/web/components/views/modal.tsxindex c7b9c9a31c..6e30a76ec1 100644--- a/web/components/views/modal.tsx+++ b/web/components/views/modal.tsx@@ -54,7 +54,7 @@ export const CreateUpdateProjectViewModal: FC<Props> = observer((props) => {setToast({type: TOAST_TYPE.ERROR,title: "Error!",- message: err.detail ?? "Something went wrong. Please try again.",+ message: err?.detail ?? "Something went wrong. Please try again.",}));};