Skip to content

Commit

Permalink
Mark the cla, about and author profile pages as low importance (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
viphan007 authored Sep 13, 2024
1 parent 67bdfae commit 48805fb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/components/CTA.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { gsap } from 'gsap'
import Link from './Link'
import { useLaunchDarklyFlag } from '../Context/LaunchDarklyFlagContext'
import { removeLanguageCode } from '../lib/utils/removeLanguageCode'
import { NO_FOLLOW_URLS } from '../lib/config.mjs'

const CTA = props => {
const {
Expand Down Expand Up @@ -263,6 +264,7 @@ const CTA = props => {
>
<ContentWrapper
to={link}
rel={NO_FOLLOW_URLS.includes(link) ? 'nofollow' : undefined}
newTab={newTab}
color={color}
$typeLayout={typeLayout}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Contentful/ContentfulModuleContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const ContentfulModuleContainer = props => {
}

const init = async () => {
const value = await getLaunchDarklyFlag('show-locale-providers-on-buy-crypto-page')
const value = await getLaunchDarklyFlag(
'show-locale-providers-on-buy-crypto-page'
)
setShowRegionSelector(value)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/NewsAuthor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function NewsAuthor({ listAuthors }) {
}
if (cur.createProfilePage) {
acc.push(
<Link key={index} to={`/author/${cur.profileUrl}/`}>
<Link key={index} rel="nofollow" to={`/author/${cur.profileUrl}/`}>
{cur.name}
</Link>
)
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useLangDetect.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const useLangDetect = () => {
const browserLanguage = navigator.language || navigator.userLanguage
const browserLangFirstCode =
browserLanguage && browserLanguage.split('-')?.[0]
const detectedBrowserLang = LOCALES.find(
l => l.htmlLang.startsWith(browserLangFirstCode)
const detectedBrowserLang = LOCALES.find(l =>
l.htmlLang.startsWith(browserLangFirstCode)
)
if (detectedBrowserLang) {
setLanguage(detectedBrowserLang)
Expand Down
2 changes: 2 additions & 0 deletions src/lib/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ export const getLocalizedPath = (pathname, newLocaleCode) => {

export const GB_BLOCKED_PATHS = ['/buy-crypto/', '/sell-crypto/', '/swaps/']
export const GB_DISCLAIMER_PATHS = ['/', '/download/', '/swaps/', '/buy-crypto/', '/sell-crypto/', '/swaps/swap-with-portfolio/', '/news/']

export const NO_FOLLOW_URLS = ['/cla/', '/about/']

0 comments on commit 48805fb

Please sign in to comment.