fix: progress chart x-axis values (#1409)

* fix: x-axis dates value in the progress chart

* chore: loader for active cycle
This commit is contained in:
Aaryan Khandelwal 2023-06-27 18:08:37 +05:30 committed by GitHub
parent 7f1def2041
commit 7fbf0e6358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -52,7 +52,7 @@ const ProgressChart: React.FC<Props> = ({ distribution, startDate, endDate, tota
const maxDates = 4; const maxDates = 4;
const totalDates = dates.length; const totalDates = dates.length;
if (totalDates <= maxDates) return dates; if (totalDates <= maxDates) return dates.map((d) => renderShortNumericDateFormat(d));
else { else {
const interval = Math.ceil(totalDates / maxDates); const interval = Math.ceil(totalDates / maxDates);
const limitedDates = []; const limitedDates = [];

View File

@ -101,6 +101,13 @@ export const ActiveCycleDetails: React.FC = () => {
: null : null
) as { data: IIssue[] | undefined }; ) as { data: IIssue[] | undefined };
if (!currentCycle)
return (
<Loader>
<Loader.Item height="250px" />
</Loader>
);
if (!cycle) if (!cycle)
return ( return (
<div className="flex w-full items-center justify-start rounded-[10px] bg-brand-surface-2 px-6 py-4"> <div className="flex w-full items-center justify-start rounded-[10px] bg-brand-surface-2 px-6 py-4">