diff --git a/site/source/pages/Stats/Stats.tsx b/site/source/pages/Stats/Stats.tsx
index 9a1bd0029..114e6abcc 100644
--- a/site/source/pages/Stats/Stats.tsx
+++ b/site/source/pages/Stats/Stats.tsx
@@ -29,7 +29,7 @@ type Period = 'mois' | 'jours'
type Chapter2 = PageChapter2 | 'PAM'
const chapters2: Chapter2[] = [
- ...new Set(stats.visitesMois.pages.map((p) => p.page_chapter2)),
+ ...new Set(stats.visitesMois?.pages.map((p) => p.page_chapter2)),
'PAM',
]
@@ -301,10 +301,18 @@ const Indicators = styled.div`
`
export default function Stats() {
+ const statsAvailable = stats.visitesMois !== undefined
+
return (
<>
-
-
+ {statsAvailable ? (
+ <>
+
+
+ >
+ ) : (
+ Statistiques indisponibles.
+ )}
>
diff --git a/site/source/pages/integration/Iframe.tsx b/site/source/pages/integration/Iframe.tsx
index 46534a04b..575d049e7 100644
--- a/site/source/pages/integration/Iframe.tsx
+++ b/site/source/pages/integration/Iframe.tsx
@@ -14,7 +14,7 @@ import urssafLogo from '@/images/Urssaf.svg'
import { lazy, Suspense, useContext, useEffect, useRef, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { Route } from 'react-router'
-import { MemoryRouter } from 'react-router-dom'
+import { MemoryRouter, useSearchParams } from 'react-router-dom-v5-compat'
import styled from 'styled-components'
import { TrackingContext, TrackPage } from '../../ATInternetTracking'
import { hexToHSL } from '../../hexToHSL'
@@ -28,7 +28,6 @@ import './iframe.css'
import cciLogo from './images/cci.png'
import minTraLogo from './images/min-tra.jpg'
import poleEmploiLogo from './images/pole-emploi.png'
-import { useSearchParams } from 'react-router-dom-v5-compat'
const LazyColorPicker = lazy(() => import('../Dev/ColorPicker'))