Skip to content

Commit 1601b7d

Browse files
authored
Only show footer copilot search experiment when enabled (#55919)
1 parent 641c4f7 commit 1601b7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/frame/components/page-footer/SupportSection.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { useRouter } from 'next/router'
99
import { useTranslation } from 'src/languages/components/useTranslation'
1010
import { AISearchCTAPopup } from '@/search/components/input/AISearchCTAPopup'
1111
import { useSearchOverlayContext } from '@/search/components/context/SearchOverlayContext'
12+
import { EXPERIMENTS } from '@/events/components/experiments/experiments'
13+
import { useShouldShowExperiment } from '@/events/components/experiments/useShouldShowExperiment'
1214

1315
import styles from './SupportSection.module.scss'
1416

@@ -18,6 +20,9 @@ export const SupportSection = () => {
1820
const router = useRouter()
1921
const { t } = useTranslation('footer')
2022
const { setIsSearchOpen } = useSearchOverlayContext()
23+
const { showExperiment: showNewSearch } = useShouldShowExperiment(
24+
EXPERIMENTS.ai_search_experiment,
25+
)
2126

2227
const isDeprecated =
2328
enterpriseServerReleases.isOldestReleaseDeprecated &&
@@ -29,7 +34,7 @@ export const SupportSection = () => {
2934
const showSurvey = !isDeprecated && !isSitePolicyDocs
3035
const showContribution = !isDeprecated && !isEarlyAccess && isEnglish
3136
const showSupport = true
32-
const showCopilotCTA = !isDeprecated && !isEarlyAccess && isEnglish
37+
const showCopilotCTA = !isDeprecated && !isEarlyAccess && isEnglish && showNewSearch
3338

3439
return (
3540
<section className="container-xl mt-lg-8 mt-6 px-3 px-md-6 no-print mx-auto">

0 commit comments

Comments
 (0)