Inscription : le bouton redevient utilisable après un retour arrière depuis Stripe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tony AVERTY 2026-10-07 12:36:09 +02:00
parent c63df75a17
commit 8a1785bb47
5 changed files with 12 additions and 4 deletions

View file

@ -44,6 +44,14 @@ export function SignupPage() {
const [error, setError] = useState<string | null>(params.get('annule') ? 'Paiement annulé : rien n’a été prélevé. Vous pouvez reprendre quand vous voulez.' : null);
const [busy, setBusy] = useState(false);
// Retour arrière depuis Stripe : le navigateur restaure la page telle quelle (cache),
// bouton encore « Redirection… ». On la rend de nouveau utilisable.
useEffect(() => {
const onShow = (e: PageTransitionEvent) => e.persisted && setBusy(false);
window.addEventListener('pageshow', onShow);
return () => window.removeEventListener('pageshow', onShow);
}, []);
useEffect(() => {
publicApi.get<PlanInfo[]>('/api/public/signup/plans').then(setCatalog).catch(() => undefined);
}, []);

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@
<title>Affichette — MonEspacePro</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/espace/index-BvzCzq_L.js"></script>
<script type="module" crossorigin src="/assets/espace/index-U4aQOhAx.js"></script>
<link rel="stylesheet" crossorigin href="/assets/espace/index-Co2TMa3A.css">
</head>
<body>

View file

@ -8,7 +8,7 @@
<title>Mon espace — MonEspacePro</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/espace/index-BvzCzq_L.js"></script>
<script type="module" crossorigin src="/assets/espace/index-U4aQOhAx.js"></script>
<link rel="stylesheet" crossorigin href="/assets/espace/index-Co2TMa3A.css">
</head>
<body>

View file

@ -7,7 +7,7 @@
<title>Créer mon programme de fidélité — MonEspacePro</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/espace/index-BvzCzq_L.js"></script>
<script type="module" crossorigin src="/assets/espace/index-U4aQOhAx.js"></script>
<link rel="stylesheet" crossorigin href="/assets/espace/index-Co2TMa3A.css">
</head>
<body>