Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions apps/dashboard/src/@/actions/joinWaitlist.ts

This file was deleted.

28 changes: 0 additions & 28 deletions apps/dashboard/src/@/api/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,3 @@ export async function getDefaultTeam() {
}
return null;
}

type TeamNebulaWaitList = {
onWaitlist: boolean;
createdAt: null | string;
};

export async function getTeamNebulaWaitList(teamSlug: string) {
const token = await getAuthToken();

if (!token) {
return null;
}

const res = await fetch(
`${API_SERVER_URL}/v1/teams/${teamSlug}/waitlist?scope=nebula`,
{
headers: {
Authorization: `Bearer ${token}`,
},
},
);

if (res.ok) {
return (await res.json()).result as TeamNebulaWaitList;
}

return null;
}
56 changes: 1 addition & 55 deletions apps/dashboard/src/app/nebula-app/(app)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { type Team, getTeams } from "@/api/team";
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
import Link from "next/link";
import { getTeams } from "@/api/team";
import type React from "react";
import { getValidAccount } from "../../account/settings/getAccount";
import {
getAuthToken,
getAuthTokenWalletAddress,
} from "../../api/lib/getAuthToken";
import { loginRedirect } from "../../login/loginRedirect";
import { NebulaWaitListPage } from "../../team/[team_slug]/[project_slug]/nebula/components/nebula-waitlist-page";
import { getSessions } from "./api/session";
import { ChatPageLayout } from "./components/ChatPageLayout";
import { NebulaAccountButton } from "./components/NebulaAccountButton";
import { NebulaIcon } from "./icons/NebulaIcon";

export default async function Layout(props: {
children: React.ReactNode;
Expand All @@ -37,15 +32,6 @@ export default async function Layout(props: {
loginRedirect();
}

const teamWithNebulaAccess = teams.find((team) =>
team.enabledScopes.includes("nebula"),
);

// if none of them teams have nebula access, request access on first team, and show waitlist page
if (!teamWithNebulaAccess) {
return <NebulaWaitlistPage account={account} team={firstTeam} />;
}

const sessions = await getSessions({
authToken,
}).catch(() => []);
Expand All @@ -61,43 +47,3 @@ export default async function Layout(props: {
</ChatPageLayout>
);
}

function NebulaWaitlistPage(props: {
account: Account;
team: Team;
}) {
return (
<div className="flex min-h-dvh flex-col overflow-hidden">
<header className="border-b">
<div className="container flex items-center justify-between px-4 py-3">
<div className="flex items-center gap-2 font-medium text-xl tracking-tight">
<NebulaIcon className="size-8 text-foreground" />
Nebula
</div>
<div className="flex items-center gap-6">
<Link
href="https://thirdweb.com/support"
className="text-muted-foreground text-sm hover:text-foreground"
target="_blank"
>
Support
</Link>

<Link
href="https://portal.thirdweb.com/"
className="text-muted-foreground text-sm hover:text-foreground"
target="_blank"
>
Docs
</Link>

<NebulaAccountButton account={props.account} type="compact" />
</div>
</div>
</header>

{/* page */}
<NebulaWaitListPage team={props.team} hideHeader />
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ import { NebulaIcon } from "../../../../nebula-app/(app)/icons/NebulaIcon";
export function ProjectSidebarLayout(props: {
layoutPath: string;
children: React.ReactNode;
showNebula: boolean;
}) {
const { layoutPath, children, showNebula } = props;
const { layoutPath, children } = props;

const tracking = (label: string) => ({
category: "project-sidebar",
Expand Down Expand Up @@ -60,16 +59,12 @@ export function ProjectSidebarLayout(props: {
icon: ContractIcon,
tracking: tracking("contracts"),
},
...(showNebula
? [
{
href: `${layoutPath}/nebula`,
label: "Nebula",
icon: NebulaIcon,
tracking: tracking("nebula"),
},
]
: []),
{
href: `${layoutPath}/nebula`,
label: "Nebula",
icon: NebulaIcon,
tracking: tracking("nebula"),
},
{
href: `${layoutPath}/insight`,
label: "Insight",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getProjects } from "@/api/projects";
import { getTeamNebulaWaitList, getTeams } from "@/api/team";
import { getTeams } from "@/api/team";
import { SidebarProvider } from "@/components/ui/sidebar";
import { redirect } from "next/navigation";
import { AnnouncementBanner } from "../../../../components/notices/AnnouncementBanner";
Expand Down Expand Up @@ -49,9 +49,6 @@ export default async function ProjectLayout(props: {
redirect(`/team/${params.team_slug}`);
}

const isOnNebulaWaitList = (await getTeamNebulaWaitList(team.slug))
?.onWaitlist;

const layoutPath = `/team/${params.team_slug}/${params.project_slug}`;

return (
Expand All @@ -67,10 +64,7 @@ export default async function ProjectLayout(props: {
accountAddress={accountAddress}
/>
</div>
<ProjectSidebarLayout
layoutPath={layoutPath}
showNebula={!!isOnNebulaWaitList}
>
<ProjectSidebarLayout layoutPath={layoutPath}>
{props.children}
</ProjectSidebarLayout>
</div>
Expand Down

This file was deleted.

Loading
Loading