From d307c727ea0df4390d8502d2c1a073b27b325f5b Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:35:37 +0530 Subject: [PATCH] fix: profile activity application error (#4214) --- web/components/profile/overview/priority-distribution.tsx | 2 +- web/components/profile/overview/state-distribution.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/components/profile/overview/priority-distribution.tsx b/web/components/profile/overview/priority-distribution.tsx index f43aed81c..f2f36e22a 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 = ({ userProfile }) => {datum.data.priority}: diff --git a/web/components/profile/overview/state-distribution.tsx b/web/components/profile/overview/state-distribution.tsx index 9c1489425..ce12d3bb1 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 = ({ 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 = ({ stateDistribution, u arcLabelsTextColor="#000000" enableArcLinkLabels={false} activeInnerRadiusOffset={5} - colors={(datum) => datum.data.color} + colors={(datum) => datum?.data?.color} tooltip={(datum) => (
{datum.datum.label} issues:{" "} @@ -62,7 +62,7 @@ export const ProfileStateDistribution: React.FC = ({ stateDistribution, u
{STATE_GROUPS[group.state_group].label}