mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
TEAM PAGE WORKS WITH 1 ERROR WOOOOOOOO
This commit is contained in:
1 parent
68e9af2d83
commit
6b87e0f7fb
5 files changed
+284
-234
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user