Skip to content

Commit

Permalink
Revert "feat(feedback): Change "Report a problem" link to open feedba…
Browse files Browse the repository at this point in the history
…ck modal (#7878)"

This reverts commit c7fd4c6.
  • Loading branch information
billyvg committed Sep 29, 2023
1 parent aec26ef commit 0550208
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
28 changes: 4 additions & 24 deletions src/components/githubCta.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, {Fragment} from 'react';
import React from 'react';

import {FeedbackModal} from './feedback/feedbackModal';
import {SmartLink} from './smartLink';

type GitHubCTAProps = {
Expand Down Expand Up @@ -28,28 +27,9 @@ export function GitHubCTA({sourceInstanceName, relativePath}: GitHubCTAProps) {
Contribute to Docs
</SmartLink>{' '}
&nbsp;&nbsp;|&nbsp;&nbsp;
<FeedbackModal title="Report a Problem">
{({showModal}) => (
<Fragment>
<SmartLink
to="https://github.com/getsentry/sentry-docs/issues/new/choose"
onClick={e => {
if (!window.Sentry?.getCurrentHub?.()) {
return true;
}

// Only Stop event propagation if Sentry SDK is loaded
// (i.e. feedback is supported), otherwise will send you to github
e.preventDefault();
showModal();
return false;
}}
>
Report a problem
</SmartLink>{' '}
</Fragment>
)}
</FeedbackModal>
<SmartLink to="https://github.com/getsentry/sentry-docs/issues/new/choose">
Report a problem
</SmartLink>{' '}
</div>
</small>
</div>
Expand Down
5 changes: 2 additions & 3 deletions src/components/smartLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ import {marketingUrlParams} from 'sentry-docs/utils';

import {ExternalLink} from './externalLink';

interface Props {
type Props = {
activeClassName?: string;
children?: React.ReactNode;
className?: string;
href?: string;
isActive?: boolean;
onClick?: (e: React.MouseEvent) => void;
remote?: boolean;
target?: string;
title?: string;
to?: string;
}
};

export function SmartLink({
to,
Expand Down

0 comments on commit 0550208

Please sign in to comment.