diff --git a/apps/dashboard/src/@/api/team/team-subscription.ts b/apps/dashboard/src/@/api/team/team-subscription.ts index ad183e8fe33..c7097ce2f22 100644 --- a/apps/dashboard/src/@/api/team/team-subscription.ts +++ b/apps/dashboard/src/@/api/team/team-subscription.ts @@ -82,7 +82,7 @@ const CHAIN_PLAN_TO_INFRA = { ], }; -export async function getChainSubscriptions(slug: string) { +async function getChainSubscriptions(slug: string) { const allSubscriptions = await getTeamSubscriptions(slug); if (!allSubscriptions) { return null; diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx index 39a3d4e11d3..e68da7105e6 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/TeamSidebarLayout.tsx @@ -10,7 +10,6 @@ import { HelpCircleIcon, HomeIcon, SettingsIcon, - WalletCardsIcon, } from "lucide-react"; import { FullWidthSidebarLayout } from "@/components/blocks/full-width-sidebar-layout"; @@ -18,11 +17,6 @@ export function TeamSidebarLayout(props: { layoutPath: string; children: React.ReactNode; ecosystems: Array<{ name: string; slug: string }>; - chainSubscriptions: Array<{ - chainId: number; - chainName: string; - slug: string; - }>; }) { const { layoutPath, children } = props; @@ -72,24 +66,6 @@ export function TeamSidebarLayout(props: { { separator: true, } as const, - // infrastructure below here - // TODO: make this one link to an overview page that has a list of all the chains currently deployed - { - links: [ - ...props.chainSubscriptions.map((chainSubscription) => ({ - href: `${layoutPath}/~/infrastructure/${chainSubscription.slug}`, - label: chainSubscription.chainName, - })), - { - href: `${layoutPath}/~/infrastructure/deploy`, - label: "Deploy Infrastructure", - }, - ], - subMenu: { - icon: WalletCardsIcon, - label: "Chain Infrastucture", - }, - }, ]} footerSidebarLinks={[ { diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx index 259f26c3960..075447f006e 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/layout.tsx @@ -4,13 +4,11 @@ import { getAuthToken, getAuthTokenWalletAddress } from "@/api/auth-token"; import { getProjects } from "@/api/project/projects"; import { fetchEcosystemList } from "@/api/team/ecosystems"; import { getTeamBySlug, getTeams } from "@/api/team/get-team"; -import { getChainSubscriptions } from "@/api/team/team-subscription"; import { CustomChatButton } from "@/components/chat/CustomChatButton"; import { AnnouncementBanner } from "@/components/misc/AnnouncementBanner"; import { SidebarProvider } from "@/components/ui/sidebar"; import { siwaExamplePrompts } from "@/constants/siwa-example-prompts"; import { getClientThirdwebClient } from "@/constants/thirdweb-client.client"; -import { getChain } from "../../../(dashboard)/(chain)/utils"; import { TeamHeaderLoggedIn } from "../../components/TeamHeader/team-header-logged-in.client"; import { StaffModeNotice } from "./_components/StaffModeNotice"; import { TeamSidebarLayout } from "./TeamSidebarLayout"; @@ -21,52 +19,26 @@ export default async function TeamLayout(props: { }) { const params = await props.params; - const [ - accountAddress, - account, - teams, - authToken, - team, - ecosystems, - chainSubscriptions, - ] = await Promise.all([ - getAuthTokenWalletAddress(), - getValidAccount(`/team/${params.team_slug}`), - getTeams(), - getAuthToken(), - getTeamBySlug(params.team_slug), - fetchEcosystemList(params.team_slug), - getChainSubscriptions(params.team_slug), - ]); + const [accountAddress, account, teams, authToken, team, ecosystems] = + await Promise.all([ + getAuthTokenWalletAddress(), + getValidAccount(`/team/${params.team_slug}`), + getTeams(), + getAuthToken(), + getTeamBySlug(params.team_slug), + fetchEcosystemList(params.team_slug), + ]); if (!teams || !accountAddress || !authToken || !team) { redirect("/login"); } - const [teamsAndProjects, chainSidebarLinks] = await Promise.all([ - Promise.all( - teams.map(async (team) => ({ - projects: await getProjects(team.slug), - team, - })), - ), - chainSubscriptions - ? await Promise.all( - chainSubscriptions.map(async (chainSubscription) => { - if (!chainSubscription.chainId) { - throw new Error("Chain ID is required"); - } - const chain = await getChain(chainSubscription.chainId); - - return { - chainId: chain.chainId, - chainName: chain.name, - slug: chain.slug, - }; - }), - ).catch(() => []) - : [], - ]); + const teamsAndProjects = await Promise.all( + teams.map(async (team) => ({ + projects: await getProjects(team.slug), + team, + })), + ); const client = getClientThirdwebClient({ jwt: authToken, @@ -92,9 +64,6 @@ export default async function TeamLayout(props: { a.chainId - b.chainId, - )} ecosystems={ecosystems.map((ecosystem) => ({ name: ecosystem.name, slug: ecosystem.slug,