diff --git a/frontend/src/lib/lemon-ui/Link/Link.tsx b/frontend/src/lib/lemon-ui/Link/Link.tsx index 3f7813e75f070..9cb0a3fe770de 100644 --- a/frontend/src/lib/lemon-ui/Link/Link.tsx +++ b/frontend/src/lib/lemon-ui/Link/Link.tsx @@ -1,15 +1,11 @@ import './Link.scss' import clsx from 'clsx' -import { useActions } from 'kea' import { router } from 'kea-router' -import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' import { isExternalLink } from 'lib/utils' import React from 'react' import { useNotebookDrag } from 'scenes/notebooks/AddToNotebook/DraggableToNotebook' -import { sidePanelDocsLogic } from '~/layout/navigation-3000/sidepanel/panels/sidePanelDocsLogic' - import { IconOpenInNew } from '../icons' import { Tooltip } from '../Tooltip' @@ -54,9 +50,10 @@ const isPostHogDomain = (url: string): boolean => { return /^https:\/\/((www|app|eu)\.)?posthog\.com/.test(url) } -const isPostHogComDocs = (url: string): boolean => { - return /^https:\/\/(www\.)?posthog\.com\/docs/.test(url) -} +// NOTE: Temporarily disabled - owner @corywatilo +// const isPostHogComDocs = (url: string): boolean => { +// return /^https:\/\/(www\.)?posthog\.com\/docs/.test(url) +// } /** * Link @@ -87,8 +84,9 @@ export const Link: React.FC> = Reac href: typeof to === 'string' ? to : undefined, }) - const is3000 = useFeatureFlag('POSTHOG_3000', 'test') - const { openDocsPage } = useActions(sidePanelDocsLogic) + // NOTE: Temporarily disabled - owner @corywatilo + // const is3000 = useFeatureFlag('POSTHOG_3000', 'test') + // const { openDocsPage } = useActions(sidePanelDocsLogic) const onClick = (event: React.MouseEvent): void => { if (event.metaKey || event.ctrlKey) { @@ -103,11 +101,12 @@ export const Link: React.FC> = Reac return } - if (typeof to === 'string' && is3000 && isPostHogComDocs(to)) { - event.preventDefault() - openDocsPage(to) - return - } + // NOTE: Temporarily disabled - owner @corywatilo + // if (typeof to === 'string' && is3000 && isPostHogComDocs(to)) { + // event.preventDefault() + // openDocsPage(to) + // return + // } if (!target && to && !isExternalLink(to) && !disableClientSideRouting && !shouldForcePageLoad(to)) { event.preventDefault()