📈 ajoute les mois M - 3 et M - 4 aux stats

pull/1098/head
Johan Girod 2020-08-26 15:15:23 +02:00
parent 8d4a8f7c20
commit 5e298dc112
2 changed files with 10 additions and 2 deletions

View File

@ -61,7 +61,9 @@ async function fetchSimulatorsMonth() {
return {
currentMonth: await getDataFromXMonthAgo(0),
oneMonthAgo: await getDataFromXMonthAgo(1),
twoMonthAgo: await getDataFromXMonthAgo(2)
twoMonthAgo: await getDataFromXMonthAgo(2),
threeMonthAgo: await getDataFromXMonthAgo(3),
fourMonthAgo: await getDataFromXMonthAgo(4)
}
}

View File

@ -28,7 +28,13 @@ import { useSimulatorsMetadata } from '../Simulateurs/Home'
const stats: StatsData = statsJson as any
const monthPeriods = ['currentMonth', 'oneMonthAgo', 'twoMonthAgo'] as const
const monthPeriods = [
'currentMonth',
'oneMonthAgo',
'twoMonthAgo',
'threeMonthAgo',
'fourMonthAgo'
] as const
type MonthPeriod = typeof monthPeriods[number]
type Periodicity = 'daily' | 'monthly'