Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/sourcegraph/about
Browse files Browse the repository at this point in the history
  • Loading branch information
ykdojo committed Jun 18, 2024
2 parents dd55397 + 789acc3 commit e5233df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 154 deletions.
8 changes: 4 additions & 4 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export const Banner: FunctionComponent<{}> = () => (
<div className="sg-border-gradient-banner z-[1000] border-b-1 bg-black py-[13px]">
<div className="mx-auto flex max-w-screen-xl flex-col items-center justify-center gap-y-[9px] gap-x-12 px-2 md:flex-row">
<p className="mb-0 text-center font-semibold leading-[22px] text-white">
Cody for JetBrains is now Generally Available
AI Dev Tools Night: Come to our upcoming meetup in SF!
</p>
<Link
href="https://sourcegraph.com/blog/cody-for-jetbrains-is-generally-available"
title="Cody for JetBrains blog"
href="https://sourcegraph.com/blog/ai-dev-tools-night-meetup-june-24"
title="AI Dev Tools Night"
className="btn bg-transparent !px-0 !py-0 leading-[22px] text-violet-300"
>
See what's new
Learn more
<ChevronRightIcon className="!mb-0 ml-[6px] inline" />
</Link>
</div>
Expand Down
97 changes: 0 additions & 97 deletions src/components/cody/CodyHeadline.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions src/hooks/useFeatureFlag.tsx

This file was deleted.

31 changes: 5 additions & 26 deletions src/pages/cody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionComponent, useEffect, useState } from 'react'
import { FunctionComponent, useState } from 'react'

import classNames from 'classnames'
import { useRouter } from 'next/router'
Expand All @@ -16,15 +16,13 @@ import {
CodyPartners,
CodyTestimonials,
} from '../components'
import { CodyHeadline } from '../components/cody/CodyHeadline'
import { CodyChooseLlmDualTheme } from '../components/cody/dual-theme/CodyChooseLlmDualTheme'
import { CodyIntroDualTheme } from '../components/cody/dual-theme/CodyIntroDualTheme'
import { SourcePoweredDualTheme } from '../components/cody/dual-theme/SourcePoweredDualTheme'
import { HowCodyWorks } from '../components/cody/HowCodyWorks'
import { useAuthModal } from '../context/AuthModalContext'
import { breakpoints } from '../data/breakpoints'
import { useFeatureFlag } from '../hooks/useFeatureFlag'
import { useWindowWidth } from '../hooks/windowWidth'
import { TelemetryProps } from '../telemetry'

import styles from '../styles/CustomHubspotForm.module.scss'

Expand All @@ -51,7 +49,7 @@ const IMAGE_TAB_CONTENT = [
},
]

const CodyPage: FunctionComponent<TelemetryProps> = ({ telemetryRecorder }) => {
const CodyPage: FunctionComponent = () => {
const [isContactModalOpen, setIsContactModalOpen] = useState(false)
const windowWidth = useWindowWidth()
const isMobile = windowWidth < breakpoints.lg
Expand All @@ -62,25 +60,6 @@ const CodyPage: FunctionComponent<TelemetryProps> = ({ telemetryRecorder }) => {
const source = pathname.slice(1) || 'about-home'
const handleOpenModal = (): void => openModal(source)

const { flagValue: userFlag, isFlagReady } = useFeatureFlag('cody-value-headline-test')

useEffect(() => {
if (isFlagReady) {
const headlineTestEventArguments = {
testName: 'ValueHeadlineTestEnrolled',
group: (userFlag as string) ?? 'undefined',
}

telemetryRecorder.recordEvent('ValueHeadlineTestEnrolled', 'view', {
privateMetadata: headlineTestEventArguments,
})
}
}, [isFlagReady, telemetryRecorder, userFlag])

if (!isFlagReady) {
return null
}

return (
<Layout
meta={{
Expand All @@ -95,11 +74,11 @@ const CodyPage: FunctionComponent<TelemetryProps> = ({ telemetryRecorder }) => {
>
<div className="relative">
<div className="sg-bg-gradient-cody-light-mobile-hero !absolute top-[310px] z-[10] h-[650px] w-[1000px] md:relative md:hidden md:bg-none" />
<CodyHeadline
<CodyIntroDualTheme
isLight={true}
title="Code more, type less"
handleOpenModal={handleOpenModal}
wrapperClassName="relative z-[20] md:z-0"
userGroup={userFlag as string}
/>
<CodyAutocomplete isLight={true} wrapperClassName="z-[20] md:z-0" />
</div>
Expand Down

0 comments on commit e5233df

Please sign in to comment.