Browse Source

ref(js): Prefer `external` over `target` on Buttons (#36174)

Evan Purkhiser 2 years ago
parent
commit
164d933772

+ 1 - 1
static/app/views/performance/onboarding.tsx

@@ -120,8 +120,8 @@ function Onboarding({organization, project}: Props) {
       <ButtonList gap={1}>
         <Button
           priority="primary"
-          target="_blank"
           href="https://docs.sentry.io/performance-monitoring/getting-started/"
+          external
         >
           {t('Start Setup')}
         </Button>

+ 0 - 1
static/app/views/performance/transactionDetails/finishSetupAlert.tsx

@@ -26,7 +26,6 @@ export default function FinishSetupAlert({
       <Button
         size="xsmall"
         priority="primary"
-        target="_blank"
         external
         href="https://docs.sentry.io/performance-monitoring/getting-started/"
         onClick={() =>

+ 1 - 1
static/app/views/settings/components/dataScrubbing/index.tsx

@@ -181,7 +181,7 @@ class DataScrubbing<T extends ProjectId = undefined> extends Component<Props<T>,
             disabled={disabled}
           />
           <PanelAction>
-            <Button href={ADVANCED_DATASCRUBBING_LINK} target="_blank">
+            <Button href={ADVANCED_DATASCRUBBING_LINK} external>
               {t('Read Docs')}
             </Button>
             <Button

+ 1 - 1
static/app/views/settings/project/projectOwnership/addCodeOwnerModal.tsx

@@ -138,7 +138,7 @@ class AddCodeOwnerModal extends AsyncComponent<Props, State> {
         <SourceFileBody>
           <IconCheckmark size="md" isCircled color="green200" />
           {codeownersFile.filepath}
-          <Button size="small" href={codeownersFile.html_url} target="_blank">
+          <Button size="small" href={codeownersFile.html_url} external>
             {t('Preview File')}
           </Button>
         </SourceFileBody>