Skip to content

Commit 5ca4493

Browse files
committed
[TOOL-2925] Dashboard: Redirect to Nebula app if team has access instead of showing waitlist page (#5894)
## PR-Codex overview This PR introduces a check for `nebula` access in two `page.tsx` files, redirecting users to the Nebula web app if access is granted. It also maintains the existing login redirect functionality. ### Detailed summary - Added a check for `nebula` access using `team.enabledScopes.includes("nebula")`. - Redirects to `https://nebula.thirdweb.com` if access is granted. - Updated login redirect paths in both `page.tsx` files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent dd4b1e8 commit 5ca4493

File tree

2 files changed

+16
-0
lines changed
  • apps/dashboard/src/app/team/[team_slug]

2 files changed

+16
-0
lines changed

apps/dashboard/src/app/team/[team_slug]/(team)/~/nebula/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getTeamBySlug } from "@/api/team";
2+
import { redirect } from "next/navigation";
23
import { loginRedirect } from "../../../../../login/loginRedirect";
34
import { NebulaWaitListPage } from "../../../[project_slug]/nebula/components/nebula-waitlist-page";
45

@@ -14,5 +15,12 @@ export default async function Page(props: {
1415
loginRedirect(`/team/${params.team_slug}/~/nebula`);
1516
}
1617

18+
// if nebula access is already granted, redirect to nebula web app
19+
const hasNebulaAccess = team.enabledScopes.includes("nebula");
20+
21+
if (hasNebulaAccess) {
22+
redirect("https://nebula.thirdweb.com");
23+
}
24+
1725
return <NebulaWaitListPage team={team} />;
1826
}

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/page.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getTeamBySlug } from "@/api/team";
2+
import { redirect } from "next/navigation";
23
import { loginRedirect } from "../../../../login/loginRedirect";
34
import { NebulaWaitListPage } from "./components/nebula-waitlist-page";
45

@@ -15,5 +16,12 @@ export default async function Page(props: {
1516
loginRedirect(`/team/${params.team_slug}/${params.project_slug}/nebula`);
1617
}
1718

19+
// if nebula access is already granted, redirect to nebula web app
20+
const hasNebulaAccess = team.enabledScopes.includes("nebula");
21+
22+
if (hasNebulaAccess) {
23+
redirect("https://nebula.thirdweb.com");
24+
}
25+
1826
return <NebulaWaitListPage team={team} />;
1927
}

0 commit comments

Comments
 (0)