Add info about the new api cache in stats graph
parent
897b37795f
commit
1f9deb7068
|
@ -2068,6 +2068,8 @@ stats:
|
|||
change_january_2022: Modification of the user feedback module resulting in a
|
||||
significant decrease in the number of notices
|
||||
change_january_2023: Modification of the user feedback module
|
||||
change_june_2023: Addition of an API cache to improve performance and reduce the
|
||||
number of requests.
|
||||
description: Discover our usage statistics updated daily.
|
||||
title: Statistics
|
||||
statut du dirigeant:
|
||||
|
|
|
@ -2112,6 +2112,8 @@ stats:
|
|||
change_january_2022: Modification du module de retours utilisateurs entraînant
|
||||
une baisse significative des avis
|
||||
change_january_2023: Modification du module de retours utilisateurs
|
||||
change_june_2023: Ajout d'un cache sur l'API pour améliorer les performances et
|
||||
réduire le nombre de requêtes.
|
||||
description: Découvrez nos statistiques d'utilisation mises à jour quotidiennement.
|
||||
title: Statistiques
|
||||
statut du dirigeant:
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
ComposedChart,
|
||||
Legend,
|
||||
Line,
|
||||
ReferenceLine,
|
||||
ResponsiveContainer,
|
||||
Tooltip,
|
||||
XAxis,
|
||||
|
@ -28,6 +29,7 @@ type Period = 'mois' | 'jours'
|
|||
export type Data<T = number | Record<string, number>> = {
|
||||
date: string
|
||||
nombre: T
|
||||
info?: ReactNode
|
||||
}[]
|
||||
|
||||
export type DataStacked = Data<Record<string, number>>
|
||||
|
@ -188,6 +190,17 @@ export default function VisitsChart({
|
|||
/>
|
||||
)
|
||||
)}
|
||||
|
||||
{flattenData
|
||||
.filter(({ info }) => info)
|
||||
.map(({ date }) => (
|
||||
<ReferenceLine
|
||||
key={date}
|
||||
x={date}
|
||||
stroke={darkMode ? 'dodgerblue' : 'dodgerblue'}
|
||||
strokeWidth={2}
|
||||
/>
|
||||
))}
|
||||
</ComposedChartWithRole>
|
||||
</RealResponsiveContainer>
|
||||
</Body>
|
||||
|
@ -262,6 +275,7 @@ const CustomTooltip = ({
|
|||
|
||||
return (
|
||||
<StyledLegend>
|
||||
{data.info}
|
||||
<Body>
|
||||
{period === 'jours' ? formatDayLong(data.date) : formatMonth(data.date)}
|
||||
</Body>
|
||||
|
|
|
@ -68,6 +68,10 @@ export const StatsDetail = ({ stats, accessibleMode }: StatsDetailProps) => {
|
|||
return (rawData.api ?? []).map(({ date, ...nombre }) => ({
|
||||
date,
|
||||
nombre,
|
||||
info:
|
||||
(period === 'jours' ? '2023-06-16' : '2023-06-01') === date ? (
|
||||
<ChangeJune2023 />
|
||||
) : null,
|
||||
}))
|
||||
}
|
||||
if (chapter2 === 'guide') {
|
||||
|
@ -307,6 +311,15 @@ export const StatsDetail = ({ stats, accessibleMode }: StatsDetailProps) => {
|
|||
)
|
||||
}
|
||||
|
||||
const ChangeJune2023 = () => (
|
||||
<Body style={{ maxWidth: '350px' }}>
|
||||
<Trans i18nKey="stats.change_june_2023">
|
||||
Ajout d'un cache sur l'API pour améliorer les performances et réduire le
|
||||
nombre de requêtes.
|
||||
</Trans>
|
||||
</Body>
|
||||
)
|
||||
|
||||
const isPAM = (name: string | undefined) =>
|
||||
name &&
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue