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