There is lot of hardcoding links in application (#3130)
* There is lot of hardcoding links in application * Apply suggestions from code review Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: Omar López <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
16 files changed
+60
-37
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import slugify from "@calcom/lib/slugify";
|
||||
import { WEBSITE_URL } from "@calcom/lib/constants";
|
||||
|
||||
export type ResponseUsernameApi = {
|
||||
available: boolean;
|
||||
@@ -9,7 +10,7 @@ export type ResponseUsernameApi = {
|
||||
|
||||
export async function checkPremiumUsername(_username: string): Promise<ResponseUsernameApi> {
|
||||
const username = slugify(_username);
|
||||
const response = await fetch("https://cal.com/api/username", {
|
||||
const response = await fetch(`${ WEBSITE_URL }/api/username`, {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@@ -18,3 +18,12 @@ export const TRIAL_LIMIT_DAYS = 14;
|
||||
export const HOSTED_CAL_FEATURES = process.env.HOSTED_CAL_FEATURES || BASE_URL === "https://app.cal.com";
|
||||
/** @deprecated use `WEBAPP_URL` */
|
||||
export const NEXT_PUBLIC_BASE_URL = process.env.NEXT_PUBLIC_WEBAPP_URL || `https://${process.env.VERCEL_URL}`;
|
||||
export const LOGO = "/calendso-logo-white-word.svg";
|
||||
export const LOGO_ICON = "/cal-com-icon-white.svg";
|
||||
export const ROADMAP = "https://cal.com/roadmap";
|
||||
export const JOIN_SLACK = "https://cal.com/slack";
|
||||
export const POWERED_BY_URL = `${WEBSITE_URL}?utm_source=embed&utm_medium=powered-by-button`;
|
||||
export const DOCS_URL = "https://docs.cal.com";
|
||||
export const SEO_IMG_DEFAULT = `${WEBSITE_URL}/og-image.png`;
|
||||
export const SEO_IMG_OGIMG = "https://og-image-one-pi.vercel.app/";
|
||||
export const SEO_IMG_OGIMG_VIDEO = `${WEBSITE_URL}/video-og-image.png`;
|
||||
Reference in new issue
Block a user