fix(web): clear needsSetup state after OOBE completion to prevent loop

When SetupWizard completes POST /api/setup and navigates to /admin,
App.tsx still has needsSetup=true in React state, causing an immediate
redirect back to /setup. Pass onSetupComplete callback to SetupWizard
which clears the state before navigating, breaking the loop.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Flea Flicker
2026-04-05 23:09:43 +00:00
parent f56e2de165
commit e435fe344e
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ export function App() {
if (location.pathname === "/setup") {
return (
<BrandingProvider>
<SetupWizard />
<SetupWizard onSetupComplete={() => setNeedsSetup(false)} />
</BrandingProvider>
);
}