Fix: Setup-Wizard Redirect + market_news Migration

- Replace navigate() with window.location.href for full page reload
  after setup completion (fixes redirect loop back to /setup)
- Add migration 002: market_news table with indexes
- Remove unused useNavigate import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sam 2026-03-02 16:32:43 +01:00
parent c15176bff4
commit 94cf618e0d
2 changed files with 24 additions and 3 deletions

View file

@ -1,5 +1,4 @@
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import {
Lock, Cloud, Home, ListTodo, Server, Radio, Newspaper, Webhook,
ArrowRight, ArrowLeft, SkipForward, CheckCircle2, Loader2,
@ -47,7 +46,6 @@ interface ServerEntry {
/* ------------------------------------------------------------------ */
export default function SetupWizard() {
const navigate = useNavigate();
const [step, setStep] = useState(0);
const [busy, setBusy] = useState(false);
const [error, setError] = useState("");
@ -164,7 +162,8 @@ export default function SetupWizard() {
if (token) {
setAuth(token, "admin");
}
navigate("/", { replace: true });
// Full reload so App.tsx re-checks setup status from server
window.location.href = "/";
} catch (err: any) {
setError(err.message);
} finally {