diff --git a/site/source/components/Simulation/index.tsx b/site/source/components/Simulation/index.tsx
index fa81a1263..fcc71d34f 100644
--- a/site/source/components/Simulation/index.tsx
+++ b/site/source/components/Simulation/index.tsx
@@ -10,6 +10,7 @@ import ShareOrSaveSimulationBanner, {
import { Button } from '@/design-system/buttons'
import { Grid, Spacing } from '@/design-system/layout'
import { H3 } from '@/design-system/typography/heading'
+import { ilYADesQuestionsSelector } from '@/store/selectors/ilYADesQuestions.selector'
import { firstStepCompletedSelector } from '@/store/selectors/simulationSelectors'
import { TrackPage } from '../ATInternetTracking'
@@ -63,6 +64,7 @@ export default function Simulation({
entrepriseSelection = true,
}: SimulationProps) {
const firstStepCompleted = useSelector(firstStepCompletedSelector)
+ const ilYADesQuestions = useSelector(ilYADesQuestionsSelector)
const shouldShowFeedback = getShouldAskFeedback(useLocation().pathname)
return (
@@ -79,7 +81,9 @@ export default function Simulation({
{results}
-
+ {ilYADesQuestions && (
+
+ )}
>
)}
diff --git a/site/source/store/selectors/ilYADesQuestions.selector.test.ts b/site/source/store/selectors/ilYADesQuestions.selector.test.ts
new file mode 100644
index 000000000..a316232ae
--- /dev/null
+++ b/site/source/store/selectors/ilYADesQuestions.selector.test.ts
@@ -0,0 +1,38 @@
+import { describe, expect, it } from 'vitest'
+
+import { RootState } from '@/store/reducers/rootReducer'
+import { ilYADesQuestionsSelector } from '@/store/selectors/ilYADesQuestions.selector'
+
+describe('sélecteur ilYADesQuestions', () => {
+ it('retourne true si une question est en cours', () => {
+ expect(
+ ilYADesQuestionsSelector({
+ simulation: {
+ currentQuestion: 'a',
+ questionsSuivantes: [],
+ },
+ } as unknown as RootState)
+ ).toEqual(true)
+ })
+ it('retourne true si au moins une question en attente', () => {
+ expect(
+ ilYADesQuestionsSelector({
+ simulation: {
+ currentQuestion: undefined,
+ questionsSuivantes: ['a'],
+ },
+ } as unknown as RootState)
+ ).toEqual(true)
+ })
+ it('retourne true si au moins une question répondue', () => {
+ expect(
+ ilYADesQuestionsSelector({
+ simulation: {
+ currentQuestion: undefined,
+ questionsSuivantes: [],
+ questionsRépondues: ['a'],
+ },
+ } as unknown as RootState)
+ ).toEqual(true)
+ })
+})
diff --git a/site/source/store/selectors/ilYADesQuestions.selector.ts b/site/source/store/selectors/ilYADesQuestions.selector.ts
new file mode 100644
index 000000000..3931ddeb9
--- /dev/null
+++ b/site/source/store/selectors/ilYADesQuestions.selector.ts
@@ -0,0 +1,17 @@
+import { createSelector } from 'reselect'
+
+import { currentQuestionSelector } from '@/store/selectors/currentQuestion.selector'
+import { questionsRéponduesSelector } from '@/store/selectors/questionsRépondues.selector'
+import { questionsSuivantesSelector } from '@/store/selectors/questionsSuivantes.selector'
+
+export const ilYADesQuestionsSelector = createSelector(
+ [
+ currentQuestionSelector,
+ questionsSuivantesSelector,
+ questionsRéponduesSelector,
+ ],
+ (questionEnCours, questionsSuivantes, questionsRépondues) =>
+ !!questionEnCours ||
+ !!questionsSuivantes.length ||
+ !!questionsRépondues.length
+)