diff --git a/apps/dashboard/src/@/constants/env.ts b/apps/dashboard/src/@/constants/env.ts index faf219c8263..70b75962a4e 100644 --- a/apps/dashboard/src/@/constants/env.ts +++ b/apps/dashboard/src/@/constants/env.ts @@ -34,14 +34,14 @@ export const THIRDWEB_ACCESS_TOKEN = process.env.THIRDWEB_ACCESS_TOKEN; // Comma-separated list of chain IDs to disable faucet for. export const DISABLE_FAUCET_CHAIN_IDS = process.env.DISABLE_FAUCET_CHAIN_IDS; +export const BASE_URL = isProd + ? "https://thirdweb.com" + : (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL + ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}` + : "http://localhost:3000") || "https://thirdweb-dev.com"; + export function getAbsoluteUrlFromPath(path: string) { - const url = new URL( - isProd - ? "https://thirdweb.com" - : (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL - ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}` - : "http://localhost:3000") || "https://thirdweb-dev.com", - ); + const url = new URL(BASE_URL); url.pathname = path; return url; diff --git a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/EcosystemCreatePage.tsx b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/EcosystemCreatePage.tsx index 91b89e0249e..ba3fcdfbadb 100644 --- a/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/EcosystemCreatePage.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/create/EcosystemCreatePage.tsx @@ -1,9 +1,7 @@ import { CreateEcosystemForm } from "./components/client/create-ecosystem-form.client"; import { EcosystemWalletPricingCard } from "./components/pricing-card"; -export function EcosystemCreatePage(props: { - ecosystemLayoutPath: string; -}) { +export async function EcosystemCreatePage(props: { teamSlug: string }) { return (