From c4f2dbea8900bbaae5dc9888836031adb6a819a7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 Jun 2026 09:24:48 +0200 Subject: [PATCH] fix: setup page must not show complete when API fails Co-authored-by: Cursor --- prediqo_web/src/features/auth/SetupPage.tsx | 24 ++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/prediqo_web/src/features/auth/SetupPage.tsx b/prediqo_web/src/features/auth/SetupPage.tsx index 3aa835bd..1a15f3ec 100644 --- a/prediqo_web/src/features/auth/SetupPage.tsx +++ b/prediqo_web/src/features/auth/SetupPage.tsx @@ -41,7 +41,7 @@ export function SetupPage() { }, }); - const needsSetup = statusQ.data?.needsSetup ?? false; + const needsSetup = statusQ.data?.needsSetup ?? true; const setupEnabled = statusQ.data?.setupEnabled ?? false; const submitCreate = async () => { @@ -92,6 +92,28 @@ export function SetupPage() { ); } + if (statusQ.isError) { + return ( + + + + + Impossible de vérifier l'état d'initialisation + + + L'API n'a pas répondu. Vérifiez que{' '} + VITE_API_BASE_URL correspond à l'URL publique (ex.{' '} + http://prediqo.redirectme.net:9080) puis reconstruisez le frontend. + + + + + + ); + } + if (!needsSetup) { return (