fix: set canonical to https://cal.com on .dev as well (#7883)

pull/7821/head^2
Richard Poelderl 2023-03-22 15:43:59 +01:00 committed by GitHub
parent efb9bf7116
commit 4e2473531f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ export const HeadSeo = (props: HeadSeoProps): JSX.Element => {
// Get the current URL from the window object
const url = getBrowserInfo()?.url;
// Check if the URL is from cal.com
const isCalcom = url && new URL(url).hostname.endsWith("cal.com");
const isCalcom =
url && (new URL(url).hostname.endsWith("cal.com") || new URL(url).hostname.endsWith("cal.dev"));
// Get the router's path
const path = useRouter().asPath;
// Build the canonical URL using the router's path, without query parameters. Note: on homepage it omits the trailing slash