Fix stats simulation terminé

pull/2558/head
Jérémy Rialland 2023-04-06 15:59:54 +02:00 committed by Jérémy Rialland
parent 26f3c8d16e
commit 6a02d6556a
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { DottedName } from 'modele-social'
import Engine, { PublicodesExpression } from 'publicodes'
import React from 'react'
import React, { useEffect, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
@ -60,6 +60,9 @@ export default function Conversation({
dispatch(answerQuestion(dottedName, value))
}
const [firstRenderDone, setFirstRenderDone] = useState(false)
useEffect(() => setFirstRenderDone(true), [])
return (
<>
<div className="print-only">
@ -161,7 +164,7 @@ export default function Conversation({
</FromTop>
) : (
<div style={{ textAlign: 'center' }}>
<TrackPage name="simulation terminée" />
{firstRenderDone && <TrackPage name="simulation terminée" />}
<H3 as="h2">
<Emoji emoji="🌟" />{' '}
<Trans i18nKey="simulation-end.title">