finishSetupAlert.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import styled from '@emotion/styled';
  2. import Button from 'sentry/components/button';
  3. import PageAlertBar from 'sentry/components/pageAlertBar';
  4. import {IconLightning} from 'sentry/icons';
  5. import {t} from 'sentry/locale';
  6. import space from 'sentry/styles/space';
  7. import {Organization} from 'sentry/types';
  8. import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
  9. export default function FinishSetupAlert({
  10. organization,
  11. projectId,
  12. }: {
  13. organization: Organization;
  14. projectId: string;
  15. }) {
  16. return (
  17. <PageAlertBar>
  18. <IconLightning />
  19. <TextWrapper>
  20. {t(
  21. 'You are viewing a sample transaction. Configure performance to start viewing real transactions.'
  22. )}
  23. </TextWrapper>
  24. <Button
  25. size="xsmall"
  26. priority="primary"
  27. target="_blank"
  28. external
  29. href="https://docs.sentry.io/performance-monitoring/getting-started/"
  30. onClick={() =>
  31. trackAdvancedAnalyticsEvent('growth.sample_transaction_docs_link_clicked', {
  32. project_id: projectId,
  33. organization,
  34. })
  35. }
  36. >
  37. {t('Get Started')}
  38. </Button>
  39. </PageAlertBar>
  40. );
  41. }
  42. const TextWrapper = styled('span')`
  43. margin: 0 ${space(1)};
  44. `;