Redirect auth flows to / instead of /performance

After login, email verification, trust device, and profile setup,
users are now redirected to / which handles routing to their first
org's dashboard.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-10 16:55:09 +08:00
parent 5e483941cc
commit 9f4c6ac0b9
4 changed files with 5 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ const statusQuery = createQuery(() => ({
$effect(() => { $effect(() => {
if (statusQuery.data?.status === "completed") { if (statusQuery.data?.status === "completed") {
clearLoginFlowState(); clearLoginFlowState();
goto(statusQuery.data.redirectTo || "/performance"); goto(statusQuery.data.redirectTo || "/");
} }
}); });

View File

@@ -22,7 +22,7 @@ const userQuery = createQuery(() => ({
// Redirect if user doesn't need setup // Redirect if user doesn't need setup
$effect(() => { $effect(() => {
if (userQuery.data && !userQuery.data.needsSetup) { if (userQuery.data && !userQuery.data.needsSetup) {
goto("/performance"); goto("/");
} }
}); });
@@ -68,7 +68,7 @@ async function handleSubmit(e: Event) {
}); });
toast.success("Profile setup complete!"); toast.success("Profile setup complete!");
goto("/performance"); goto("/");
} catch (e) { } catch (e) {
error = e instanceof Error ? e.message : "Failed to save profile"; error = e instanceof Error ? e.message : "Failed to save profile";
} finally { } finally {

View File

@@ -52,7 +52,7 @@ async function handleTrust() {
try { try {
await api.me.trustDevice({ name: deviceName.trim() }); await api.me.trustDevice({ name: deviceName.trim() });
toast.success("Device trusted successfully!"); toast.success("Device trusted successfully!");
goto("/performance"); goto("/");
} catch (e) { } catch (e) {
error = e instanceof Error ? e.message : "Failed to trust device"; error = e instanceof Error ? e.message : "Failed to trust device";
} finally { } finally {

View File

@@ -31,7 +31,7 @@ async function verifyEmail(): Promise<void> {
try { try {
await api.auth.verifyEmail({ token }); await api.auth.verifyEmail({ token });
toast.success("Email verified successfully!"); toast.success("Email verified successfully!");
goto("/performance"); goto("/");
} catch (e) { } catch (e) {
error = e instanceof Error ? e.message : "Verification failed"; error = e instanceof Error ? e.message : "Verification failed";
} finally { } finally {