From ea1881c8aa3ddae546af621455c7c251c3c64738 Mon Sep 17 00:00:00 2001 From: Robert Sese Date: Wed, 23 Feb 2022 15:28:08 -0600 Subject: [PATCH] Don't show contribution section when not English (#25583) --- components/page-footer/SupportSection.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/page-footer/SupportSection.tsx b/components/page-footer/SupportSection.tsx index 20b891877487..56d7fc2d9d39 100644 --- a/components/page-footer/SupportSection.tsx +++ b/components/page-footer/SupportSection.tsx @@ -5,15 +5,18 @@ import { Contribution } from 'components/page-footer/Contribution' import { Support } from 'components/page-footer/Support' import { useMainContext } from 'components/context/MainContext' import { useVersion } from 'components/hooks/useVersion' +import { useRouter } from 'next/router' export const SupportSection = () => { const { currentVersion } = useVersion() const { relativePath, enterpriseServerReleases } = useMainContext() + const router = useRouter() const isDeprecated = enterpriseServerReleases.isOldestReleaseDeprecated && currentVersion.includes(enterpriseServerReleases.oldestSupported) const isEarlyAccess = relativePath?.includes('early-access/') + const isEnglish = router.locale === 'en' return (
@@ -23,7 +26,7 @@ export const SupportSection = () => { )} - {!isDeprecated && !isEarlyAccess && ( + {!isDeprecated && !isEarlyAccess && isEnglish && (