|
1 |
| -import { type FC, useState, useEffect } from 'react' |
| 1 | +import { useEffect, useState, type FC } from 'react' |
2 | 2 |
|
3 | 3 | import { mdiChevronDown } from '@mdi/js'
|
4 | 4 |
|
5 | 5 | import type { TelemetryV2Props } from '@sourcegraph/shared/src/telemetry'
|
6 |
| -import { useIsLightTheme } from '@sourcegraph/shared/src/theme' |
7 | 6 | import {
|
8 |
| - Text, |
9 |
| - H1, |
10 | 7 | ButtonLink,
|
| 8 | + H1, |
| 9 | + Icon, |
11 | 10 | Link,
|
12 | 11 | Menu,
|
13 | 12 | MenuButton,
|
14 |
| - MenuList, |
15 | 13 | MenuItem,
|
16 |
| - Icon, |
17 |
| - Position, |
18 | 14 | MenuLink,
|
| 15 | + MenuList, |
| 16 | + Position, |
| 17 | + Text, |
19 | 18 | } from '@sourcegraph/wildcard'
|
20 | 19 |
|
21 |
| -import { getLicenseFeatures } from '../../util/license' |
22 | 20 | import { CodyColorIcon } from '../chat/CodyPageIcon'
|
23 | 21 | import { IntelliJIcon } from '../upsell/IntelliJ'
|
24 | 22 | import { VSCodeIcon } from '../upsell/vs-code'
|
25 | 23 |
|
26 |
| -import { UpsellImage } from './UpsellImage' |
27 |
| - |
28 | 24 | import styles from './CodyDashboardPage.module.scss'
|
29 | 25 |
|
30 | 26 | interface SetupOption {
|
@@ -56,9 +52,7 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
|
56 | 52 | telemetryRecorder.recordEvent('cody.dashboard', 'view')
|
57 | 53 | }, [telemetryRecorder])
|
58 | 54 |
|
59 |
| - const isLightTheme = useIsLightTheme() |
60 | 55 | const codySetupLink = 'https://sourcegraph.com/docs/cody'
|
61 |
| - const features = getLicenseFeatures() |
62 | 56 | return (
|
63 | 57 | <section className={styles.dashboardContainer}>
|
64 | 58 | <section className={styles.dashboardHero}>
|
@@ -91,23 +85,6 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
|
91 | 85 | </ButtonLink>
|
92 | 86 | </section>
|
93 | 87 | </section>
|
94 |
| - |
95 |
| - {!features.isCodeSearchEnabled && ( |
96 |
| - <section className={styles.dashboardUpsell}> |
97 |
| - <section className={styles.dashboardUpsellMeta}> |
98 |
| - <SearchIcon /> |
99 |
| - <Text className={styles.dashboardUpsellTitle}> |
100 |
| - Take control of your codebases with Code Search. |
101 |
| - </Text> |
102 |
| - <Text className={styles.dashboardUpsellDescription}> |
103 |
| - Code Search allows you to search, understand and fix code, across massive codebases. |
104 |
| - Discover vulnerabilities, improve code quality and more. |
105 |
| - </Text> |
106 |
| - <Link to="/search">Explore Code Search</Link> |
107 |
| - </section> |
108 |
| - <UpsellImage isLightTheme={isLightTheme} className="w-100" /> |
109 |
| - </section> |
110 |
| - )} |
111 | 88 | </section>
|
112 | 89 | )
|
113 | 90 | }
|
@@ -154,28 +131,3 @@ const LinkSelector: FC<LinkSelectorProps> = ({ options }) => {
|
154 | 131 | </section>
|
155 | 132 | )
|
156 | 133 | }
|
157 |
| - |
158 |
| -const SearchIcon: FC = () => ( |
159 |
| - <svg xmlns="http://www.w3.org/2000/svg" width="37" height="40" fill="none" viewBox="0 0 37 40"> |
160 |
| - <path |
161 |
| - fill="url(#paint0_linear_1070_2338)" |
162 |
| - fillRule="evenodd" |
163 |
| - d="M18.067 4.53c-7.441 0-13.5 6.029-13.5 13.5 0 7.47 6.059 13.5 13.5 13.5a2.274 2.274 0 012.284 2.264 2.274 2.274 0 01-2.284 2.265C8.074 36.059 0 27.972 0 18.029 0 8.087 8.074 0 18.067 0c9.994 0 18.068 8.087 18.068 18.03 0 4.964-2.013 9.463-5.268 12.724l5.393 5.386a2.251 2.251 0 01-.011 3.202 2.296 2.296 0 01-3.23-.01l-7.101-7.094a2.254 2.254 0 01.243-3.402 13.476 13.476 0 005.408-10.807c0-7.47-6.06-13.5-13.502-13.5z" |
164 |
| - clipRule="evenodd" |
165 |
| - /> |
166 |
| - <defs> |
167 |
| - <linearGradient |
168 |
| - id="paint0_linear_1070_2338" |
169 |
| - x1="0.885" |
170 |
| - x2="30.949" |
171 |
| - y1="26.786" |
172 |
| - y2="27.094" |
173 |
| - gradientUnits="userSpaceOnUse" |
174 |
| - > |
175 |
| - <stop stopColor="#00CBEC" /> |
176 |
| - <stop offset="0.51" stopColor="#A112FF" /> |
177 |
| - <stop offset="1" stopColor="#FF5543" /> |
178 |
| - </linearGradient> |
179 |
| - </defs> |
180 |
| - </svg> |
181 |
| -) |
0 commit comments