diff --git a/app/(main)/team/[teamId]/page.js b/app/(main)/team/[teamId]/page.js
index 346a516..9ebcdb2 100644
--- a/app/(main)/team/[teamId]/page.js
+++ b/app/(main)/team/[teamId]/page.js
@@ -212,7 +212,7 @@ export default function TeamPage({ params }) {
-
+
🏠
Home
diff --git a/app/api/teams/[teamId]/route.js b/app/api/teams/[teamId]/route.js
index 8656cf7..83c20d2 100644
--- a/app/api/teams/[teamId]/route.js
+++ b/app/api/teams/[teamId]/route.js
@@ -19,9 +19,10 @@ export async function GET(request, context) {
return Response.json({ error: "Invalid session" }, { status: 401 });
}
- // Properly await the params object before accessing it
- const params = context.params || {};
- const teamId = params.teamId;
+ // FIXED: Always await context.params before accessing properties
+ // This approach ensures we properly handle the promise before accessing teamId
+ const params = await Promise.resolve(context.params);
+ const teamId = params?.teamId;
// Validate teamId
if (!teamId || isNaN(parseInt(teamId, 10))) {