Files
calendar/packages/lib/getCalcomUrl.ts
Joe Au-YeungandGitHub ed6f9d8252 fix: Add cal.eu to IS_CALCOM (#23111)
* Add cal.eu to `IS_CALCOM`

* Create `getCalcomUrl` function

* Use `getCalcomURl` in generate metadata

* Use `getCalcomURl` in `buildCanonical`

* Linting fix
2025-08-18 16:04:48 +05:30

9 lines
236 B
TypeScript

import { WEBAPP_URL, IS_CALCOM } from "./constants";
export const getCalcomUrl = () => {
if (IS_CALCOM) {
return new URL(WEBAPP_URL).hostname.endsWith("cal.eu") ? "https://cal.eu" : "https://cal.com";
}
return WEBAPP_URL;
};