From 5e837f43854a52c04e3c967ab6b0a6dfff55a222 Mon Sep 17 00:00:00 2001 From: Joe Martin <84011561+joethreepwood@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:31:11 +0100 Subject: [PATCH] fix: Make error contact point to support modal (#24048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: MarconLP <13001502+MarconLP@users.noreply.github.com> Co-authored-by: Thomas Obermüller --- .../layout/ErrorBoundary/ErrorBoundary.tsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/layout/ErrorBoundary/ErrorBoundary.tsx b/frontend/src/layout/ErrorBoundary/ErrorBoundary.tsx index cb3212d21ab..28b171d53e1 100644 --- a/frontend/src/layout/ErrorBoundary/ErrorBoundary.tsx +++ b/frontend/src/layout/ErrorBoundary/ErrorBoundary.tsx @@ -1,12 +1,13 @@ import './ErrorBoundary.scss' -import { IconChevronDown } from '@posthog/icons' import { ErrorBoundary as SentryErrorBoundary, getCurrentHub } from '@sentry/react' -import { HelpButton } from 'lib/components/HelpButton/HelpButton' +import { useActions } from 'kea' +import { supportLogic } from 'lib/components/Support/supportLogic' import { LemonButton } from 'lib/lemon-ui/LemonButton' export function ErrorBoundary({ children }: { children?: React.ReactNode }): JSX.Element { const isSentryInitialized = !!getCurrentHub().getClient() + const { openSupportForm } = useActions(supportLogic) return ( }> - Contact PostHog - - } - customKey="error-boundary" - contactOnly - /> + openSupportForm({ kind: 'bug', isEmailFormOpen: true })} + targetBlank + className="mt-2" + > + Email an engineer + )}