|
@@ -1,5 +1,7 @@
|
|
|
import {css} from '@emotion/react';
|
|
|
+import type {UrlObject} from 'query-string';
|
|
|
|
|
|
+import SentryAppLink from 'sentry/components/devtoolbar/components/sentryAppLink';
|
|
|
import useConfiguration from 'sentry/components/devtoolbar/hooks/useConfiguration';
|
|
|
import {buttonCss} from 'sentry/components/devtoolbar/styles/typography';
|
|
|
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
|
|
@@ -10,6 +12,7 @@ import {resetDialogCss, resetFlexColumnCss, resetFlexRowCss} from '../styles/res
|
|
|
|
|
|
interface Props {
|
|
|
children?: React.ReactNode;
|
|
|
+ link?: UrlObject;
|
|
|
showProjectBadge?: boolean;
|
|
|
title?: string;
|
|
|
titleRight?: React.ReactNode;
|
|
@@ -20,6 +23,7 @@ export default function PanelLayout({
|
|
|
title,
|
|
|
titleRight,
|
|
|
showProjectBadge,
|
|
|
+ link,
|
|
|
}: Props) {
|
|
|
const {projectId, projectSlug, projectPlatform} = useConfiguration();
|
|
|
return (
|
|
@@ -51,7 +55,13 @@ export default function PanelLayout({
|
|
|
{alignItems: 'center', marginRight: 'var(--space100)'},
|
|
|
]}
|
|
|
>
|
|
|
- <h1 css={[buttonCss]}>{title}</h1>
|
|
|
+ {link ? (
|
|
|
+ <SentryAppLink to={link}>
|
|
|
+ <h1 css={[buttonCss]}>{title}</h1>
|
|
|
+ </SentryAppLink>
|
|
|
+ ) : (
|
|
|
+ <h1 css={[buttonCss]}>{title}</h1>
|
|
|
+ )}
|
|
|
{titleRight}
|
|
|
</header>
|
|
|
) : null}
|