Skip to content

Commit 6e86f50

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: dont 404 if project isnt in list in SSR (#44007)
GitOrigin-RevId: 66f6482f542a5807b70ace10ae56e36adde4eda6
1 parent a25e2b7 commit 6e86f50

File tree

1 file changed

+1
-6
lines changed
  • npm-packages/dashboard/src/lib

1 file changed

+1
-6
lines changed

npm-packages/dashboard/src/lib/ssr.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ const getProps: GetServerSideProps<{
121121
}[];
122122
} = await resp.json();
123123
const { team, project, deploymentName } = query;
124-
if (
125-
(team && !teams.find((t: TeamResponse) => t.slug === team.toString())) ||
126-
(project &&
127-
!projects.find((p: ProjectDetails) => p.slug === project.toString()))
128-
) {
124+
if (team && !teams.find((t: TeamResponse) => t.slug === team.toString())) {
129125
// You're looking for a page that doesn't exist!
130126
return pageNotFound(res);
131127
}
@@ -288,7 +284,6 @@ async function redirectToProjectPage(
288284
},
289285
};
290286
} catch (error) {
291-
console.error("Error redirecting to project page", error);
292287
return pageNotFound(res);
293288
}
294289
}

0 commit comments

Comments
 (0)