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(() => {
if (statusQuery.data?.status === "completed") {
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
$effect(() => {
if (userQuery.data && !userQuery.data.needsSetup) {
goto("/performance");
goto("/");
}
});
@@ -68,7 +68,7 @@ async function handleSubmit(e: Event) {
});
toast.success("Profile setup complete!");
goto("/performance");
goto("/");
} catch (e) {
error = e instanceof Error ? e.message : "Failed to save profile";
} finally {

View File

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

View File

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