fix: managed type url in orgs (#14698)

This commit is contained in:
Udit Takkar
2024-04-22 09:38:58 +01:00
committed by GitHub
parent df95ec4ce8
commit c0f8a355e3
@@ -1,6 +1,7 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import type { Props } from "react-select";
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
import { classNames } from "@calcom/lib";
import { WEBSITE_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -34,7 +35,10 @@ export const ChildrenEventTypeSelect = ({
onChange: (value: readonly ChildrenEventType[]) => void;
}) => {
const { t } = useLocale();
const orgBranding = useOrgBranding();
const [animationRef] = useAutoAnimate<HTMLUListElement>();
const domain = orgBranding?.fullDomain ?? WEBSITE_URL;
return (
<>
@@ -105,7 +109,7 @@ export const ChildrenEventTypeSelect = ({
color="secondary"
target="_blank"
variant="icon"
href={`${WEBSITE_URL}/${children.owner?.username}/${children.slug}`}
href={`${domain}/${children.owner?.username}/${children.slug}`}
StartIcon="external-link"
/>
</Tooltip>