Browse Source

fix(feedback): Only show URL when crash reports have a value, or its a feedback from the widget (#63901)

Fixes https://github.com/getsentry/sentry-javascript/issues/10179
Ryan Albrecht 1 year ago
parent
commit
5d09a00268
1 changed files with 7 additions and 5 deletions
  1. 7 5
      static/app/components/feedback/feedbackItem/feedbackItem.tsx

+ 7 - 5
static/app/components/feedback/feedbackItem/feedbackItem.tsx

@@ -54,11 +54,13 @@ export default function FeedbackItem({feedbackItem, eventData, tags}: Props) {
           </Blockquote>
         </Section>
 
-        <Section icon={<IconLink size="xs" />} title={t('URL')}>
-          <TextCopyInput size="sm">
-            {eventData?.tags ? (url ? url.value : t('URL not found')) : ''}
-          </TextCopyInput>
-        </Section>
+        {!crashReportId || (crashReportId && url) ? (
+          <Section icon={<IconLink size="xs" />} title={t('URL')}>
+            <TextCopyInput size="sm">
+              {eventData?.tags ? (url ? url.value : t('URL not found')) : ''}
+            </TextCopyInput>
+          </Section>
+        ) : null}
 
         {crashReportId && (
           <Section icon={<IconFire size="xs" />} title={t('Linked Error')}>