diff --git a/site/source/components/EngineValue.tsx b/site/source/components/EngineValue.tsx index 300a7f196..706831940 100644 --- a/site/source/components/EngineValue.tsx +++ b/site/source/components/EngineValue.tsx @@ -206,7 +206,7 @@ export function WhenApplicable({ [dottedName, workerEngine] ) - return node?.nodeValue !== true ? <>{children} : null + return node?.nodeValue !== true ? null : <>{children} } export function WhenNotApplicable({ diff --git a/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx b/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx index 4fecf6eed..9ee2dde38 100644 --- a/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx +++ b/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx @@ -184,16 +184,10 @@ const caisses = [ function CaisseRetraite({ role }: { role?: string }) { const unit = useSelector(targetUnitSelector) const workerEngine = useWorkerEngine() - const rules = usePromiseOnSituationChange( - () => - Promise.all( - caisses.map((caisse) => - workerEngine.getRule( - `dirigeant . indépendant . PL . ${caisse} . cotisations` as DottedName - ) - ) - ), - [] + const rules = caisses.map((caisse) => + workerEngine.getRule( + `dirigeant . indépendant . PL . ${caisse} . cotisations` as DottedName + ) ) return (