Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: profile activity application error (#4214)

Anmol Singh Bhatiad307c727ea0d
diff --git a/web/components/profile/overview/priority-distribution.tsx b/web/components/profile/overview/priority-distribution.tsx
index f43aed81c8..f2f36e22a7 100644
--- a/web/components/profile/overview/priority-distribution.tsx
+++ b/web/components/profile/overview/priority-distribution.tsx
@@ -34,7 +34,7 @@ export const ProfilePriorityDistribution: React.FC<Props> = ({ userProfile }) =>
<span
className="h-3 w-3 rounded"
style={{
- backgroundColor: datum.color,
+ backgroundColor: datum?.color ?? "rgb(var(--color-primary-100))",
}}
/>
<span className="font-medium text-custom-text-200">{datum.data.priority}:</span>
diff --git a/web/components/profile/overview/state-distribution.tsx b/web/components/profile/overview/state-distribution.tsx
index 9c14894251..ce12d3bb12 100644
--- a/web/components/profile/overview/state-distribution.tsx
+++ b/web/components/profile/overview/state-distribution.tsx
@@ -28,7 +28,7 @@ export const ProfileStateDistribution: React.FC<Props> = ({ stateDistribution, u
id: group.state_group,
label: group.state_group,
value: group.state_count,
- color: STATE_GROUPS[group.state_group].color,
+ color: STATE_GROUPS[group.state_group]?.color ?? "rgb(var(--color-primary-100))",
})) ?? []
}
height="250px"
@@ -39,7 +39,7 @@ export const ProfileStateDistribution: React.FC<Props> = ({ stateDistribution, u
arcLabelsTextColor="#000000"
enableArcLinkLabels={false}
activeInnerRadiusOffset={5}
- colors={(datum) => datum.data.color}
+ colors={(datum) => datum?.data?.color}
tooltip={(datum) => (
<div className="flex items-center gap-2 rounded-md border border-custom-border-200 bg-custom-background-90 p-2 text-xs">
<span className="capitalize text-custom-text-200">{datum.datum.label} issues:</span>{" "}
@@ -62,7 +62,7 @@ export const ProfileStateDistribution: React.FC<Props> = ({ stateDistribution, u
<div
className="h-2.5 w-2.5 rounded-sm"
style={{
- backgroundColor: STATE_GROUPS[group.state_group].color,
+ backgroundColor: STATE_GROUPS[group.state_group]?.color ?? "rgb(var(--color-primary-100))",
}}
/>
<div className="whitespace-nowrap">{STATE_GROUPS[group.state_group].label}</div>