* Add cal.eu to `IS_CALCOM` * Create `getCalcomUrl` function * Use `getCalcomURl` in generate metadata * Use `getCalcomURl` in `buildCanonical` * Linting fix
9 lines
236 B
TypeScript
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;
|
|
};
|