feat: Implement tournament schedule tab and fix E2E tests #27
@@ -37,16 +37,18 @@ export default function RegisterPage() {
|
||||
} else {
|
||||
console.log("Signup successful, redirecting...");
|
||||
console.log("Result data:", result.data);
|
||||
|
||||
// Refresh the session after successful registration
|
||||
try {
|
||||
await refreshSession()
|
||||
await refreshSession();
|
||||
console.log("Session refreshed successfully");
|
||||
} catch (err) {
|
||||
console.error("Failed to refresh session:", err);
|
||||
}
|
||||
|
||||
// Redirect to admin page which will redirect to profile if not admin
|
||||
console.log("About to redirect to /admin");
|
||||
router.push("/admin")
|
||||
router.refresh()
|
||||
router.push("/admin");
|
||||
console.log("Redirect initiated");
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -38,14 +38,24 @@ export default function Navigation() {
|
||||
window.location.href = '/auth/login'
|
||||
}
|
||||
|
||||
// Determine wordmark href based on session and role
|
||||
const wordmarkHref = session
|
||||
? (userRole === "club_admin" || userRole === "site_admin")
|
||||
? "/admin"
|
||||
: "/rankings"
|
||||
: "/";
|
||||
|
||||
return (
|
||||
<nav className="bg-white shadow-sm">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="flex justify-between h-16">
|
||||
<div className="flex items-center">
|
||||
<Link href="/" className="text-xl font-bold text-gray-900">
|
||||
<a
|
||||
href={wordmarkHref}
|
||||
className="text-xl font-bold text-gray-900 no-underline"
|
||||
>
|
||||
EuchreCamp
|
||||
</Link>
|
||||
</a>
|
||||
<div className="hidden md:ml-6 md:flex md:space-x-8">
|
||||
<Link
|
||||
href="/rankings"
|
||||
|
||||
Reference in New Issue
Block a user