fix: active cycle fix (#2618)

This commit is contained in:
Anmol Singh Bhatia 2023-11-02 22:17:10 +05:30 committed by GitHub
parent caca2bb548
commit a582021f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -475,7 +475,7 @@ export const ActiveCycleDetails: React.FC<IActiveCycleDetails> = (props) => {
</div> </div>
<div className="relative h-64"> <div className="relative h-64">
<ProgressChart <ProgressChart
distribution={cycle.distribution.completion_chart} distribution={cycle.distribution?.completion_chart ?? {}}
startDate={cycle.start_date ?? ""} startDate={cycle.start_date ?? ""}
endDate={cycle.end_date ?? ""} endDate={cycle.end_date ?? ""}
totalIssues={cycle.total_issues} totalIssues={cycle.total_issues}

View File

@ -67,10 +67,10 @@ export const ActiveCycleProgressStats: React.FC<Props> = ({ cycle }) => {
Labels Labels
</Tab> </Tab>
</Tab.List> </Tab.List>
{cycle.total_issues > 0 ? ( {cycle && cycle.total_issues > 0 ? (
<Tab.Panels as={Fragment}> <Tab.Panels as={Fragment}>
<Tab.Panel as="div" className="w-full gap-1 overflow-y-scroll items-center text-custom-text-200 p-4"> <Tab.Panel as="div" className="w-full gap-1 overflow-y-scroll items-center text-custom-text-200 p-4">
{cycle.distribution.assignees.map((assignee, index) => { {cycle.distribution?.assignees?.map((assignee, index) => {
if (assignee.assignee_id) if (assignee.assignee_id)
return ( return (
<SingleProgressStats <SingleProgressStats
@ -105,7 +105,7 @@ export const ActiveCycleProgressStats: React.FC<Props> = ({ cycle }) => {
})} })}
</Tab.Panel> </Tab.Panel>
<Tab.Panel as="div" className="w-full gap-1 overflow-y-scroll items-center text-custom-text-200 p-4"> <Tab.Panel as="div" className="w-full gap-1 overflow-y-scroll items-center text-custom-text-200 p-4">
{cycle.distribution.labels.map((label, index) => ( {cycle.distribution?.labels?.map((label, index) => (
<SingleProgressStats <SingleProgressStats
key={label.label_id ?? `no-label-${index}`} key={label.label_id ?? `no-label-${index}`}
title={ title={