mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-13 13:48:59 +02:00
Fix
This commit is contained in:
parent
05ead3a562
commit
951895d743
@ -22,11 +22,17 @@ interface ICreationArchiveChartProps {
|
||||
type WeekData = {
|
||||
archivedFlags: number;
|
||||
totalCreatedFlags: number;
|
||||
createdFlags: Record<string, number>;
|
||||
week: string;
|
||||
date?: string;
|
||||
};
|
||||
|
||||
type RawWeekData = {
|
||||
archivedFlags: number;
|
||||
createdFlags: Record<string, number>;
|
||||
week: string;
|
||||
date: string;
|
||||
};
|
||||
|
||||
export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
||||
creationArchiveTrends,
|
||||
isAggregate,
|
||||
@ -50,7 +56,7 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
|
||||
return creationArchiveData.datasets
|
||||
.map((d) => d.data.find((item) => item.week === label))
|
||||
.reduce(
|
||||
(acc: WeekData, item: WeekData) => {
|
||||
(acc: WeekData, item: RawWeekData) => {
|
||||
if (item) {
|
||||
acc.archivedFlags += item.archivedFlags || 0;
|
||||
const createdFlagsSum = item.createdFlags
|
||||
|
Loading…
Reference in New Issue
Block a user