TEAM PAGE WORKS WITH 1 ERROR WOOOOOOOO

This commit is contained in:
bobbert committed 2025-03-12 19:56:19 +00:00
1 parent 68e9af2d83
commit 6b87e0f7fb
5 files changed
+284 -234

No files matched your search

+9 -2
View File
@@ -32,8 +32,15 @@ export default function Login() {
throw new Error(result.error);
}
// Success case - redirect
router.push("/team-selection");
// If the user has a team, redirect directly to the team page
if (result?.url) {
// Extract the teamId from the URL or session data if available
// This part depends on how your auth system returns the result
router.push(`/${session?.user?.teamId || ""}`);
} else {
// Otherwise go to team selection
router.push("/team-selection");
}
return;
} catch (signInError) {
console.error("Error with signIn method:", signInError);