Corrige l'espacement des bannières après le simulateur

pull/2101/head
Johan Girod 2022-04-21 12:22:39 +02:00
parent 438b6ed449
commit b6703ecb58
2 changed files with 47 additions and 43 deletions

View File

@ -14,8 +14,8 @@ export default function PreviousSimulationBanner() {
const dispatch = useDispatch()
return (
<div className="print-hidden">
<Banner hidden={!previousSimulation || newSimulationStarted} icon="💾">
<Banner hidden={!previousSimulation || newSimulationStarted} icon="💾">
<div className="print-hidden">
<Trans i18nKey="previousSimulationBanner.info">
Votre précédente simulation a été sauvegardée :
</Trans>{' '}
@ -24,7 +24,7 @@ export default function PreviousSimulationBanner() {
Retrouver ma simulation
</Trans>
</Link>
</Banner>
</div>
</div>
</Banner>
)
}

View File

@ -62,48 +62,52 @@ export default function Simulation({
<StyledGrid item xl={9} lg={10} md={11} sm={12}>
<PrintExportRecover />
{children}
<div className="print-hidden">
{!firstStepCompleted && (
<FromTop>
<div className="print-hidden">
{!firstStepCompleted && (
<>
<Spacing sm />
<PreviousSimulationBanner />
</>
)}
</div>
{firstStepCompleted && (
<>
<Spacing sm />
<PreviousSimulationBanner />
<div className="print-hidden">
<FromTop>{results}</FromTop>
</div>
<Questions customEndMessages={customEndMessages} />
</>
)}
</div>
{firstStepCompleted && (
<>
<div className="print-hidden">
<FromTop>{results}</FromTop>
</div>
<Questions customEndMessages={customEndMessages} />
</>
)}
<div className="print-hidden">
<Spacing sm />
{afterQuestionsSlot}
{existingCompany && (
<Banner icon="✏">
Ce simulateur a été prérempli avec la situation de votre
entreprise.{' '}
<PopoverWithTrigger
trigger={(buttonProps) => (
<Link {...buttonProps}>
<Trans>Voir ma situation</Trans>
</Link>
)}
>
{(close) => <AnswerList onClose={close} />}
</PopoverWithTrigger>
</Banner>
)}
{firstStepCompleted && !hideDetails && (
<>
<ShareOrSaveSimulationBanner share print placeDesEntreprises />
<Spacing lg />
</>
)}
</div>
<div className="print-hidden">
{afterQuestionsSlot}
{existingCompany && (
<Banner icon="✏">
Ce simulateur a été prérempli avec la situation de votre
entreprise.{' '}
<PopoverWithTrigger
trigger={(buttonProps) => (
<Link {...buttonProps}>
<Trans>Voir ma situation</Trans>
</Link>
)}
>
{(close) => <AnswerList onClose={close} />}
</PopoverWithTrigger>
</Banner>
)}
{firstStepCompleted && !hideDetails && (
<>
<ShareOrSaveSimulationBanner
share
print
placeDesEntreprises
/>
<Spacing lg />
</>
)}
</div>
</FromTop>
</StyledGrid>
</Grid>
{firstStepCompleted && !hideDetails && (