Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark the cla, about and author profile pages as low importance #425

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/']