diff --git a/client/src/assets/images/components/alibaba-logo.tsx b/client/src/assets/images/components/alibaba-logo.tsx new file mode 100644 index 00000000000..41ff1734ceb --- /dev/null +++ b/client/src/assets/images/components/alibaba-logo.tsx @@ -0,0 +1,56 @@ +import React from 'react'; + +function AlibabaLogo( + props: JSX.IntrinsicAttributes & React.SVGProps +): React.ReactNode { + return ( + + ); +} + +AlibabaLogo.displayName = 'AlibabaLogo'; +export default AlibabaLogo; diff --git a/client/src/assets/images/components/index.tsx b/client/src/assets/images/components/index.tsx index f254ef71606..3dce97c98f0 100644 --- a/client/src/assets/images/components/index.tsx +++ b/client/src/assets/images/components/index.tsx @@ -1,15 +1,19 @@ +import AlibabaLogo from './alibaba-logo'; import AmazonLogo from './amazon-logo'; import AppleLogo from './apple-logo'; import AsSeenInText from './as-seen-in-text'; import GoogleLogo from './google-logo'; import MicrosoftLogo from './microsoft-logo'; import SpotifyLogo from './spotify-logo'; +import TencentLogo from './tencent-logo'; export { AmazonLogo, + AlibabaLogo, AppleLogo, MicrosoftLogo, SpotifyLogo, GoogleLogo, + TencentLogo, AsSeenInText }; diff --git a/client/src/assets/images/components/tencent-logo.tsx b/client/src/assets/images/components/tencent-logo.tsx new file mode 100644 index 00000000000..337760602aa --- /dev/null +++ b/client/src/assets/images/components/tencent-logo.tsx @@ -0,0 +1,48 @@ +import React from 'react'; + +function TencentLogo( + props: JSX.IntrinsicAttributes & React.SVGProps +): React.ReactNode { + return ( + + ); +} + +TencentLogo.displayName = 'TencentLogo'; +export default TencentLogo; diff --git a/client/src/components/landing/components/LandingTop.js b/client/src/components/landing/components/LandingTop.js index a7be1cab318..8ea62c676b7 100644 --- a/client/src/components/landing/components/LandingTop.js +++ b/client/src/components/landing/components/LandingTop.js @@ -2,12 +2,15 @@ import { Col, Row } from '@freecodecamp/react-bootstrap'; import PropTypes from 'prop-types'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import envData from '../../../../../config/env.json'; import { AmazonLogo, AppleLogo, MicrosoftLogo, SpotifyLogo, - GoogleLogo + GoogleLogo, + TencentLogo, + AlibabaLogo } from '../../../assets/images/components'; import { Spacer } from '../../helpers'; import BigCallToAction from './BigCallToAction'; @@ -17,9 +20,12 @@ const propTypes = { page: PropTypes.string }; +const { clientLocale } = envData; function LandingTop({ page }) { const { t } = useTranslation(); - + const showChineseLogos = ['chinese', 'chinese-tradition'].includes( + clientLocale + ); return (
@@ -35,8 +41,17 @@ function LandingTop({ page }) { - - + {showChineseLogos ? ( + <> + + + + ) : ( + <> + + + + )}