33import { AnimatePresence , motion } from "framer-motion" ;
44import { usePathname } from "next/navigation" ;
55
6- import { WEBAPP_URL } from "@calcom/lib/constants " ;
6+ import { subdomainSuffix } from "@calcom/features/ee/organizations/ lib/orgDomains " ;
77import { useLocale } from "@calcom/lib/hooks/useLocale" ;
88import { Avatar } from "@calcom/ui/components/avatar" ;
99import { Icon } from "@calcom/ui/components/icon" ;
@@ -13,17 +13,19 @@ type OnboardingTeamsBrowserViewProps = {
1313 organizationLogo ?: string | null ;
1414 organizationName ?: string ;
1515 organizationBanner ?: string | null ;
16+ slug ?: string ;
1617} ;
1718
1819export const OnboardingTeamsBrowserView = ( {
1920 teams,
2021 organizationLogo,
2122 organizationName,
2223 organizationBanner,
24+ slug,
2325} : OnboardingTeamsBrowserViewProps ) => {
2426 const pathname = usePathname ( ) ;
2527 const { t } = useLocale ( ) ;
26- const webappUrl = WEBAPP_URL . replace ( / ^ h t t p s ? : \/ \/ / , "" ) ;
28+ const displayUrl = slug ? ` ${ slug } . ${ subdomainSuffix ( ) } ` : subdomainSuffix ( ) ;
2729
2830 // Show placeholder if no teams or all teams are empty
2931 const hasValidTeams = teams . some ( ( team ) => team . name && team . name . trim ( ) . length > 0 ) ;
@@ -54,9 +56,9 @@ export const OnboardingTeamsBrowserView = ({
5456 < Icon name = "arrow-right" className = "text-subtle h-4 w-4" />
5557 < Icon name = "rotate-cw" className = "text-subtle h-4 w-4" />
5658 </ div >
57- < div className = "bg-cal-muted flex w-full items-center gap-2 rounded-[32px] px-3 py-2" >
59+ < div className = "bg-cal-muted flex w-full min-w-0 items-center gap-2 rounded-[32px] px-3 py-2" >
5860 < Icon name = "lock" className = "text-subtle h-4 w-4" />
59- < p className = "text-default text-sm font-medium leading-tight" > { webappUrl } /teams</ p >
61+ < p className = "text-default truncate text-sm font-medium leading-tight" > { displayUrl } /teams</ p >
6062 </ div >
6163 < Icon name = "ellipsis-vertical" className = "text-subtle h-4 w-4" />
6264 </ div >
0 commit comments