Skip to content

Scheduling infrastructure for absolutely everyone.

fix: use cal url (#6013)

Udit Takkar92d15a00f50e
diff --git a/packages/features/ee/teams/pages/team-profile-view.tsx b/packages/features/ee/teams/pages/team-profile-view.tsx
index edee0c771e1..037441afacc 100644
--- a/packages/features/ee/teams/pages/team-profile-view.tsx
+++ b/packages/features/ee/teams/pages/team-profile-view.tsx
@@ -6,6 +6,7 @@ import { useRouter } from "next/router";
import { Controller, useForm } from "react-hook-form";
import { z } from "zod";
+import { CAL_URL } from "@calcom/lib/constants";
import { IS_TEAM_BILLING_ENABLED, WEBAPP_URL } from "@calcom/lib/constants";
import { getPlaceholderAvatar } from "@calcom/lib/getPlaceholderAvatar";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -86,7 +87,7 @@ const ProfileView = () => {
const isAdmin =
team && (team.membership.role === MembershipRole.OWNER || team.membership.role === MembershipRole.ADMIN);
- const permalink = `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/${team?.slug}`;
+ const permalink = `${CAL_URL?.replace(/^(https?:|)\/\//, "")}/team/${team?.slug}`;
const deleteTeamMutation = trpc.viewer.teams.delete.useMutation({
async onSuccess() {