import cx from 'classnames' import { Survey } from 'src/events/components/Survey' 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' import { useTranslation } from '../hooks/useTranslation' export const SupportSection = () => { const { currentVersion } = useVersion() const { relativePath, enterpriseServerReleases } = useMainContext() const router = useRouter() const { t } = useTranslation('footer') const isDeprecated = enterpriseServerReleases.isOldestReleaseDeprecated && currentVersion.includes(enterpriseServerReleases.oldestSupported) const isEarlyAccess = relativePath?.includes('early-access/') const isEnglish = router.locale === 'en' const isSitePolicyDocs = router.asPath.startsWith('/site-policy') const showSurvey = !isDeprecated && !isSitePolicyDocs const showContribution = !isDeprecated && !isEarlyAccess && isEnglish const showSupport = true const totalCols = Number(showSurvey) + Number(showContribution) + Number(showSupport) return (

{t('support_heading')}

{showSurvey && (
1 && 'col-lg-6', totalCols > 2 && 'col-xl-3' )} >
)} {showContribution && (
1 && 'col-lg-6', totalCols > 2 && 'col-xl-4', totalCols > 2 && showSurvey && 'offset-xl-1' )} >
)} {showSupport && (
1 && 'col-lg-6', totalCols > 2 && 'col-xl-3', totalCols > 2 && (showSurvey || showContribution) && 'offset-xl-1' )} >
)}
) }