fix: satisfaction in stats

pull/2908/head
Johan Girod 2024-03-04 11:30:38 +01:00
parent da2ad0118f
commit e0b267dc02
No known key found for this signature in database
GPG Key ID: B1240EA7FBDBA6AE
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ export default function StatPage({ stats }: StatsDetailProps) {
{!!satisfaction.length &&
// We only display the satisfaction chart if the last month's number of reviews is greater than 100
(satisfaction.at(-1)?.total ?? 0) >= 100 && (
(satisfaction.at(-2)?.total ?? 0) >= 100 && (
<>
<Spacing md />
<H3>Satisfaction</H3>

View File

@ -38,7 +38,7 @@ export function MainIndicators({
lastMonth.nombre.questions_répondues,
language
)
const satisfactionLastMonth = satisfaction.at(-1)
const satisfactionLastMonth = satisfaction.at(-2) || satisfaction.at(-1)
return (
<>