Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
chore: removed hreflang tag (#5665)
Browse files Browse the repository at this point in the history
Co-authored-by: Fasih Ali <[email protected]>
  • Loading branch information
fasihali-deriv and Fasih Ali authored Sep 22, 2023
1 parent 16549c2 commit 4a9c43c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 75 deletions.
66 changes: 0 additions & 66 deletions src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,69 +186,3 @@ export const bannerTypes = {
export const firebaseConfig = {
databaseURL: 'https://deriv-static-pricingfeedv2.firebaseio.com',
}

export const hreflang_codes_row = [
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'x-default' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en-NG' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en-BW' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en-ZW' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en-LK' },
{ rel: 'alternate', href: 'https://deriv.com/', hreflang: 'en-TZ' },
{ rel: 'alternate', href: 'https://deriv.com/es/', hreflang: 'es-CO' },
{ rel: 'alternate', href: 'https://deriv.com/es/', hreflang: 'es-EC' },
{ rel: 'alternate', href: 'https://deriv.com/es/', hreflang: 'es-BO' },
{ rel: 'alternate', href: 'https://deriv.com/es/', hreflang: 'es-MX' },
{ rel: 'alternate', href: 'https://deriv.com/es/', hreflang: 'es-CR' },
{ rel: 'alternate', href: 'https://deriv.com/fr/', hreflang: 'fr-BJ' },
{ rel: 'alternate', href: 'https://deriv.com/fr/', hreflang: 'fr-CI' },
{ rel: 'alternate', href: 'https://deriv.com/fr/', hreflang: 'fr-CD' },
{ rel: 'alternate', href: 'https://deriv.com/fr/', hreflang: 'fr-CM' },
{ rel: 'alternate', href: 'https://deriv.com/fr/', hreflang: 'fr-TG' },
{ rel: 'alternate', href: 'https://deriv.com/ar/', hreflang: 'ar-MA' },
{ rel: 'alternate', href: 'https://deriv.com/ar/', hreflang: 'ar-EG' },
{ rel: 'alternate', href: 'https://deriv.com/ar/', hreflang: 'ar-SA' },
{ rel: 'alternate', href: 'https://deriv.com/ar/', hreflang: 'ar-DZ' },
{ rel: 'alternate', href: 'https://deriv.com/ar/', hreflang: 'ar-QA' },
{ rel: 'alternate', href: 'https://deriv.com/bn/', hreflang: 'bn-BD' },
{ rel: 'alternate', href: 'https://deriv.com/ko/', hreflang: 'ko-KR' },
{ rel: 'alternate', href: 'https://deriv.com/tr/', hreflang: 'tr-TR' },
{ rel: 'alternate', href: 'https://deriv.com/pl/', hreflang: 'pl-PL' },
{ rel: 'alternate', href: 'https://deriv.com/vi/', hreflang: 'vi-VN' },
{ rel: 'alternate', href: 'https://deriv.com/th/', hreflang: 'th-TH' },
{ rel: 'alternate', href: 'https://deriv.com/ru/', hreflang: 'ru-KZ' },
{ rel: 'alternate', href: 'https://deriv.com/ru/', hreflang: 'ru-BY' },
{ rel: 'alternate', href: 'https://deriv.com/ru/', hreflang: 'ru-UA' },
{ rel: 'alternate', href: 'https://deriv.com/ru/', hreflang: 'ru-UZ' },
{ rel: 'alternate', href: 'https://deriv.com/ru/', hreflang: 'ru-GE' },
{ rel: 'alternate', href: 'https://deriv.com/zh-cn/', hreflang: 'zh-CN' },
{ rel: 'alternate', href: 'https://deriv.com/zh-tw/', hreflang: 'zh-TW' },
{ rel: 'alternate', href: 'https://deriv.com/de/', hreflang: 'de-CH' },
]

export const hreflang_codes_eu = [
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-IE' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-BG' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-HR' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-CZ' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-DK' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-EE' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-FI' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-GR' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-HU' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-LV' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-SE' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-LT' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-SK' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-SI' },
{ rel: 'alternate', href: 'https://eu.deriv.com/', hreflang: 'en-RO' },
{ rel: 'alternate', href: 'https://eu.deriv.com/es/', hreflang: 'es-ES' },
{ rel: 'alternate', href: 'https://eu.deriv.com/de/', hreflang: 'de-DE' },
{ rel: 'alternate', href: 'https://eu.deriv.com/de/', hreflang: 'de-AT' },
{ rel: 'alternate', href: 'https://eu.deriv.com/de/', hreflang: 'de-LU' },
{ rel: 'alternate', href: 'https://eu.deriv.com/fr/', hreflang: 'lb-LU' },
{ rel: 'alternate', href: 'https://eu.deriv.com/it/', hreflang: 'it-IT' },
{ rel: 'alternate', href: 'https://eu.deriv.com/pt/', hreflang: 'pt-PT' },
{ rel: 'alternate', href: 'https://eu.deriv.com/pl/', hreflang: 'pl-PL' },
]
10 changes: 1 addition & 9 deletions src/components/containers/seo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useStaticQuery, graphql, Script } from 'gatsby'
import { localize } from '../localization'
import language_config from '../../../i18n-config'
import { isBrowser } from 'common/utility'
import { eu_urls, hreflang_codes_row, hreflang_codes_eu } from 'common/constants'
import { eu_urls } from 'common/constants'
import TradingImage from 'images/common/og_deriv.jpg'
import { TString } from 'types/generics'
import { TPageContext } from 'features/types'
Expand Down Expand Up @@ -91,10 +91,6 @@ const SEO = ({
let current_page = ''
let organization_schema = {}

const hreflang_codes = site_url.includes('eu.deriv.com')
? hreflang_codes_eu
: hreflang_codes_row

if (locale_pathname) {
const path_array = locale_pathname.split('/')
const current_lang = path_array[1]
Expand Down Expand Up @@ -202,10 +198,6 @@ const SEO = ({
)
})}

{hreflang_codes.map(({ href, hreflang, rel }) => (
<link key={hreflang} rel={rel} href={href} hrefLang={hreflang} />
))}

{children}
</>
)
Expand Down

1 comment on commit 4a9c43c

@vercel
Copy link

@vercel vercel bot commented on 4a9c43c Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com-git-master.binary.sx
deriv-com.binary.sx

Please sign in to comment.