diff --git a/apps/web/components/ui/UsernameAvailability/index.tsx b/apps/web/components/ui/UsernameAvailability/index.tsx index 0630b0c256..19483d6f21 100644 --- a/apps/web/components/ui/UsernameAvailability/index.tsx +++ b/apps/web/components/ui/UsernameAvailability/index.tsx @@ -2,7 +2,7 @@ import { useRouter } from "next/router"; import { useState } from "react"; import { Controller, useForm } from "react-hook-form"; -import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; +import { getOrgFullDomain } from "@calcom/features/ee/organizations/lib/orgDomains"; import { IS_SELF_HOSTED } from "@calcom/lib/constants"; import type { TRPCClientErrorLike } from "@calcom/trpc/client"; import type { RouterOutputs } from "@calcom/trpc/react"; @@ -24,9 +24,9 @@ interface UsernameAvailabilityFieldProps { function useUserNamePrefix(organization: RouterOutputs["viewer"]["me"]["organization"]): string { return organization ? organization.slug - ? `${organization.slug}.${subdomainSuffix()}/` + ? getOrgFullDomain(organization.slug, { protocol: false }) : organization.metadata && organization.metadata.requestedSlug - ? `${organization.metadata.requestedSlug}.${subdomainSuffix()}/` + ? getOrgFullDomain(organization.metadata.requestedSlug, { protocol: false }) : process.env.NEXT_PUBLIC_WEBSITE_URL.replace("https://", "").replace("http://", "") : process.env.NEXT_PUBLIC_WEBSITE_URL.replace("https://", "").replace("http://", ""); } diff --git a/apps/web/pages/event-types/index.tsx b/apps/web/pages/event-types/index.tsx index 2453b7248a..7f6f64faed 100644 --- a/apps/web/pages/event-types/index.tsx +++ b/apps/web/pages/event-types/index.tsx @@ -8,7 +8,6 @@ import { useEffect, useState, memo } from "react"; import { z } from "zod"; import { useOrgBrandingValues } from "@calcom/features/ee/organizations/hooks"; -import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains"; import useIntercom from "@calcom/features/ee/support/lib/intercom/useIntercom"; import { EventTypeDescriptionLazy as EventTypeDescription } from "@calcom/features/eventtypes/components"; import CreateEventTypeDialog from "@calcom/features/eventtypes/components/CreateEventTypeDialog"; @@ -371,9 +370,7 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL