fixed issue with creating team. added stats page, ironing out issues before adding the clues page and integrating it properly with the map

Grey = cant click
Red = current
Green = complete
blue = skipped?
This commit is contained in:
bobbert committed 2025-03-16 17:10:22 +00:00
1 parent 15ae67f791
commit 95348df5a9
5 files changed
+46 -65

No files matched your search

+1 -1
View File
@@ -339,7 +339,7 @@ export default function CluePage({ params }) {
<div className="nav-icon">🗺️</div>
<div className="nav-label">Map</div>
</Link>
<Link href="/leaderboard" className="nav-item">
<Link href="/stats" className="nav-item">
<div className="nav-icon">📊</div>
<div className="nav-label">Stats</div>
</Link>
+4 -4
View File
@@ -31,17 +31,17 @@ export default function CreateTeam() {
setError("");
try {
// Add a check to ensure session is valid
// Check session status before proceeding
if (status !== "authenticated") {
throw new Error("You must be logged in to create a team");
}
const response = await fetch("/api/teams", {
const response = await fetch("/api/teams/create", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
credentials: "include", // Important: include credentials
credentials: "include", // Important: include credentials with the request
body: JSON.stringify({ name: teamName }),
});
@@ -59,7 +59,7 @@ export default function CreateTeam() {
credentials: "include",
});
// Hard navigation to make sure we're going to the right page
// Use window.location for a hard navigation to ensure session is fully updated
window.location.href = `/${data.teamId}`;
} catch (err) {
console.error("Team creation error:", err);
+1 -1
View File
@@ -615,7 +615,7 @@ export default function MapPage() {
<div className={styles["nav-icon"]}>🗺️</div>
<div className={styles["nav-label"]}>Map</div>
</Link>
<Link href="/leaderboard" className={styles["nav-item"]}>
<Link href="/stats" className={styles["nav-item"]}>
<div className={styles["nav-icon"]}>📊</div>
<div className={styles["nav-label"]}>Stats</div>
</Link>