Skip to content

Commit b1060de

Browse files
committed
[NEB-172]: Remove Nebula waitlist (#6745)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on removing components and related functionality for managing the Nebula waitlist in the application. It simplifies the codebase by eliminating unused imports and references to the waitlist, streamlining the `ProjectSidebarLayout`, and adjusting the layout logic. ### Detailed summary - Deleted files related to the Nebula waitlist functionality. - Removed `getTeamNebulaWaitList` function and its associated type. - Updated `ProjectSidebarLayout` to eliminate the `showNebula` prop. - Simplified `ProjectLayout` by removing waitlist checks and related logic. - Adjusted `Page` component to remove references to `NebulaWaitListPage`. - Cleaned up the `Layout` component by removing waitlist handling and related imports. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 0aca563 commit b1060de

File tree

10 files changed

+31
-419
lines changed

10 files changed

+31
-419
lines changed

apps/dashboard/src/@/actions/joinWaitlist.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/dashboard/src/@/api/team.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -74,31 +74,3 @@ export async function getDefaultTeam() {
7474
}
7575
return null;
7676
}
77-
78-
type TeamNebulaWaitList = {
79-
onWaitlist: boolean;
80-
createdAt: null | string;
81-
};
82-
83-
export async function getTeamNebulaWaitList(teamSlug: string) {
84-
const token = await getAuthToken();
85-
86-
if (!token) {
87-
return null;
88-
}
89-
90-
const res = await fetch(
91-
`${API_SERVER_URL}/v1/teams/${teamSlug}/waitlist?scope=nebula`,
92-
{
93-
headers: {
94-
Authorization: `Bearer ${token}`,
95-
},
96-
},
97-
);
98-
99-
if (res.ok) {
100-
return (await res.json()).result as TeamNebulaWaitList;
101-
}
102-
103-
return null;
104-
}
Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
import { type Team, getTeams } from "@/api/team";
2-
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
3-
import Link from "next/link";
1+
import { getTeams } from "@/api/team";
42
import type React from "react";
53
import { getValidAccount } from "../../account/settings/getAccount";
64
import {
75
getAuthToken,
86
getAuthTokenWalletAddress,
97
} from "../../api/lib/getAuthToken";
108
import { loginRedirect } from "../../login/loginRedirect";
11-
import { NebulaWaitListPage } from "../../team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist-page";
129
import { getSessions } from "./api/session";
1310
import { ChatPageLayout } from "./components/ChatPageLayout";
14-
import { NebulaAccountButton } from "./components/NebulaAccountButton";
15-
import { NebulaIcon } from "./icons/NebulaIcon";
1611

1712
export default async function Layout(props: {
1813
children: React.ReactNode;
@@ -37,15 +32,6 @@ export default async function Layout(props: {
3732
loginRedirect();
3833
}
3934

40-
const teamWithNebulaAccess = teams.find((team) =>
41-
team.enabledScopes.includes("nebula"),
42-
);
43-
44-
// if none of them teams have nebula access, request access on first team, and show waitlist page
45-
if (!teamWithNebulaAccess) {
46-
return <NebulaWaitlistPage account={account} team={firstTeam} />;
47-
}
48-
4935
const sessions = await getSessions({
5036
authToken,
5137
}).catch(() => []);
@@ -61,43 +47,3 @@ export default async function Layout(props: {
6147
</ChatPageLayout>
6248
);
6349
}
64-
65-
function NebulaWaitlistPage(props: {
66-
account: Account;
67-
team: Team;
68-
}) {
69-
return (
70-
<div className="flex min-h-dvh flex-col overflow-hidden">
71-
<header className="border-b">
72-
<div className="container flex items-center justify-between px-4 py-3">
73-
<div className="flex items-center gap-2 font-medium text-xl tracking-tight">
74-
<NebulaIcon className="size-8 text-foreground" />
75-
Nebula
76-
</div>
77-
<div className="flex items-center gap-6">
78-
<Link
79-
href="https://thirdweb.com/support"
80-
className="text-muted-foreground text-sm hover:text-foreground"
81-
target="_blank"
82-
>
83-
Support
84-
</Link>
85-
86-
<Link
87-
href="https://portal.thirdweb.com/"
88-
className="text-muted-foreground text-sm hover:text-foreground"
89-
target="_blank"
90-
>
91-
Docs
92-
</Link>
93-
94-
<NebulaAccountButton account={props.account} type="compact" />
95-
</div>
96-
</div>
97-
</header>
98-
99-
{/* page */}
100-
<NebulaWaitListPage team={props.team} hideHeader />
101-
</div>
102-
);
103-
}

apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ import { NebulaIcon } from "../../../../nebula-app/(app)/icons/NebulaIcon";
1616
export function ProjectSidebarLayout(props: {
1717
layoutPath: string;
1818
children: React.ReactNode;
19-
showNebula: boolean;
2019
}) {
21-
const { layoutPath, children, showNebula } = props;
20+
const { layoutPath, children } = props;
2221

2322
const tracking = (label: string) => ({
2423
category: "project-sidebar",
@@ -60,16 +59,12 @@ export function ProjectSidebarLayout(props: {
6059
icon: ContractIcon,
6160
tracking: tracking("contracts"),
6261
},
63-
...(showNebula
64-
? [
65-
{
66-
href: `${layoutPath}/nebula`,
67-
label: "Nebula",
68-
icon: NebulaIcon,
69-
tracking: tracking("nebula"),
70-
},
71-
]
72-
: []),
62+
{
63+
href: `${layoutPath}/nebula`,
64+
label: "Nebula",
65+
icon: NebulaIcon,
66+
tracking: tracking("nebula"),
67+
},
7368
{
7469
href: `${layoutPath}/insight`,
7570
label: "Insight",

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getProjects } from "@/api/projects";
2-
import { getTeamNebulaWaitList, getTeams } from "@/api/team";
2+
import { getTeams } from "@/api/team";
33
import { SidebarProvider } from "@/components/ui/sidebar";
44
import { redirect } from "next/navigation";
55
import { AnnouncementBanner } from "../../../../components/notices/AnnouncementBanner";
@@ -49,9 +49,6 @@ export default async function ProjectLayout(props: {
4949
redirect(`/team/${params.team_slug}`);
5050
}
5151

52-
const isOnNebulaWaitList = (await getTeamNebulaWaitList(team.slug))
53-
?.onWaitlist;
54-
5552
const layoutPath = `/team/${params.team_slug}/${params.project_slug}`;
5653

5754
return (
@@ -67,10 +64,7 @@ export default async function ProjectLayout(props: {
6764
accountAddress={accountAddress}
6865
/>
6966
</div>
70-
<ProjectSidebarLayout
71-
layoutPath={layoutPath}
72-
showNebula={!!isOnNebulaWaitList}
73-
>
67+
<ProjectSidebarLayout layoutPath={layoutPath}>
7468
{props.children}
7569
</ProjectSidebarLayout>
7670
</div>

apps/dashboard/src/app/team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist-page-ui.client.tsx

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)